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); } } }