Skip to content

Commit

Permalink
Auctions: Prevent NaN time limits
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Aug 21, 2024
1 parent 3dd6c25 commit e6d3806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/chat-plugins/auction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class Auction extends Rooms.SimpleRoomGame {
if (this.state !== 'setup') {
throw new Chat.ErrorMessage(`You cannot change the bid time limit after the auction has started.`);
}
if (seconds < 7 || seconds > 120) {
if (!seconds || seconds < 7 || seconds > 120) {
throw new Chat.ErrorMessage(`The bid time limit must be between 7 and 120 seconds.`);
}
this.bidTimeLimit = this.bidTimeRemaining = seconds;
Expand Down

0 comments on commit e6d3806

Please sign in to comment.