diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-06 19:13:47 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-06 19:13:47 +0100 |
commit | 3f162130f66aa684bea6c1d708c4a89b0534a613 (patch) | |
tree | ed78934dfe2cda2c7cd07536d259c47fbd6cbb58 | |
parent | ce732ca77bc0cbef6c053ec6095e81f2c624a327 (diff) | |
download | votes-for-women-3f162130f66aa684bea6c1d708c4a89b0534a613.tar.gz |
skip null value
-rw-r--r-- | rules.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -111,7 +111,7 @@ function is_player_claimed_card(c) { // #region US_STATES & REGIONS FUNCTIONS function find_us_state(name) { - return US_STATES.findIndex((x) => x.name === name) + return US_STATES.findIndex((x) => x && x.name === name) } function us_states(...args) { @@ -121,7 +121,7 @@ function us_states(...args) { function region_us_states(region) { const indexes = [] US_STATES.forEach((element, index) => { - if (element.region === region) indexes.push(index) + if (element && element.region === region) indexes.push(index) }) return indexes } |