Merge pull request #169 from Thomas-Smyth/next-map-bug-fix

Fix nextMapToBeVoted assignment
This commit is contained in:
Thomas Smyth 2021-03-08 15:08:06 +00:00 committed by GitHub
commit 0e1880ab65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -367,7 +367,7 @@ export default class SquadServer extends EventEmitter {
try { try {
const currentMap = await this.rcon.getCurrentMap(); const currentMap = await this.rcon.getCurrentMap();
const nextMap = await this.rcon.getNextMap(); 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 currentLayer = await Layers.getLayerByName(currentMap.layer);
const nextLayer = nextMapToBeVoted ? null : await Layers.getLayerByName(nextMap.layer); const nextLayer = nextMapToBeVoted ? null : await Layers.getLayerByName(nextMap.layer);