Skip to content

Commit

Permalink
add undefined tossup check in advanceQuestion
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey-wu committed Oct 30, 2024
1 parent 5db319a commit f86abfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quizbowl/TossupRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ export default class TossupRoom extends Room {
}

this.tossup = this.setCache.shift();
if (!this.tossup?.packet?.number) {
this.emitMessage({ type: 'no-questions-found' });
return false;
}
this.query.packetNumbers = this.query.packetNumbers.filter(packetNumber => packetNumber >= this.tossup.packet.number);
} while (!this.categoryManager.isValidCategory(this.tossup));
} else {
Expand Down

0 comments on commit f86abfb

Please sign in to comment.