Skip to content

Commit

Permalink
fix unnecessary check in setSetName
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey-wu committed Nov 19, 2024
1 parent 27a6f94 commit 191a716
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/multiplayer/ServerTossupRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,10 @@ export default class ServerTossupRoom extends TossupRoom {
super.setCategories(userId, { categories, subcategories, alternateSubcategories, percentView, categoryPercents });
}

async setSetName (userId, { packetNumbers, setName }) {
async setSetName (userId, { setName }) {
if (!this.setList) { return; }
if (!this.setList.includes(setName)) { return; }
const maxPacketNumber = await this.getNumPackets(setName);
if (packetNumbers.some((num) => num > maxPacketNumber || num < 1)) { return; }
super.setSetName(userId, { packetNumbers, setName });
super.setSetName(userId, { setName });
}

setStrictness (userId, { strictness }) {
Expand Down

0 comments on commit 191a716

Please sign in to comment.