Fix nextMapToBeVoted assignment

This commit is contained in:
Thomas Smyth 2021-03-08 15:07:18 +00:00
parent 3b7f68c9d5
commit 7e0f414376

View File

@ -367,7 +367,7 @@ export default class SquadServer extends EventEmitter {
try {
const currentMap = await this.rcon.getCurrentMap();
const nextMap = await this.rcon.getNextMap();
const nextMapToBeVoted = nextMap === 'To be voted';
const nextMapToBeVoted = nextMap.layer === 'To be voted';
const currentLayer = await Layers.getLayerByName(currentMap.layer);
const nextLayer = nextMapToBeVoted ? null : await Layers.getLayerByName(nextMap.layer);