Skip to content

Commit 169fab6

Browse files
committed
patch a crash
1 parent 8d837a0 commit 169fab6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/conventions/h-group/clue-interpretation/interpret-clue.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,13 @@ export function interpret_clue(game, action) {
812812
}
813813
last_possible_player = state.ourPlayerIndex;
814814
}
815-
const { possible } = common.thoughts[state.hands[last_possible_player].sort((a, b) => b-a).filter(c => !state.deck[c].clued)[0]];
815+
const p = common.thoughts[state.hands[last_possible_player].sort((a, b) => b-a).filter(c => !state.deck[c].clued)[0]];
816+
if (p === undefined) {
817+
game.interpretMove(CLUE_INTERP.NONE);
818+
team_elim(game);
819+
return game;
820+
}
821+
const { possible } = p;
816822
const new_inferred = possible.intersect(possible.filter(i => state.isPlayable(i)));
817823
common.updateThoughts(state.hands[last_possible_player].sort((a, b) => b-a).filter(c => !state.deck[c].clued)[0],
818824
(draft) => {

0 commit comments

Comments
 (0)