From 44d8043869a46a0385b8ce54aa9613e279f4ef79 Mon Sep 17 00:00:00 2001 From: Fantino Davide Date: Wed, 7 Sep 2022 23:03:27 +0200 Subject: [PATCH] quick fix --- mapvote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index 74a6d63..c90f76f 100644 --- a/mapvote.js +++ b/mapvote.js @@ -146,7 +146,7 @@ export default class MapVote extends BasePlugin { const seedingMaps = Layers.layers.filter((l) => l.gamemode.toUpperCase() == "SEED" && (currentNextLayerExist && l.layerid != this.server.currentLayer.layerid && !this.options.layerLevelBlacklist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase())))) do { const rndMap = randomElement(seedingMaps); - if (rndMap.layerid) { + if (rndMap && rndMap.layerid) { const nextMap = rndMap.layerid; if (this.server.players && this.server.players.length < 20) { this.verbose(1, 'Going into seeding mode.');