From 6c87db8c650a5914137c0e6102e4ee18122fdee0 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Sat, 25 Mar 2023 13:14:25 +0100 Subject: [PATCH] feat: upgrading Layers.js intrim layer list --- mapvote.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index 38cccb2..fb468f8 100644 --- a/mapvote.js +++ b/mapvote.js @@ -1095,7 +1095,10 @@ export default class MapVote extends DiscordBasePlugin { newLayer.teams[ 1 ].commander = newLayer.teams[ 0 ].commander } - Layers.layers.push(newLayer); + if (Layers._layers && Layers._layers instanceof Map) + Layers._layers.set(newLayer.layerid, newLayer); + else + Layers.layers.push(newLayer); } } }