From fa0d13f48f40ddd2939776f8e46ca69feb633b49 Mon Sep 17 00:00:00 2001 From: Joshua Rodriguez Date: Tue, 14 Jan 2020 16:46:27 -0800 Subject: [PATCH] fix map swaping --- BlueMapCore/src/main/webroot/js/libs/modules/MapMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BlueMapCore/src/main/webroot/js/libs/modules/MapMenu.js b/BlueMapCore/src/main/webroot/js/libs/modules/MapMenu.js index 18efe69e..483eff69 100644 --- a/BlueMapCore/src/main/webroot/js/libs/modules/MapMenu.js +++ b/BlueMapCore/src/main/webroot/js/libs/modules/MapMenu.js @@ -39,9 +39,9 @@ export default class MapMenu { for (let mapId in maps) { if (!maps.hasOwnProperty(mapId)) continue; - if (!maps.enabled) continue; - const map = maps[mapId]; + if (!map.enabled) continue; + $(`
  • ${map.name}
  • `).appendTo(this.maplist); } @@ -51,7 +51,7 @@ export default class MapMenu { } onMapClick = event => { - const map = $(this).attr('map'); + const map = $(event.target).attr('map'); this.bluemap.changeMap(map); }