fix map swaping

This commit is contained in:
Joshua Rodriguez 2020-01-14 16:46:27 -08:00
parent 989e4253f2
commit fa0d13f48f

View File

@ -39,9 +39,9 @@ export default class MapMenu {
for (let mapId in maps) { for (let mapId in maps) {
if (!maps.hasOwnProperty(mapId)) continue; if (!maps.hasOwnProperty(mapId)) continue;
if (!maps.enabled) continue;
const map = maps[mapId]; const map = maps[mapId];
if (!map.enabled) continue;
$(`<li map="${mapId}">${map.name}</li>`).appendTo(this.maplist); $(`<li map="${mapId}">${map.name}</li>`).appendTo(this.maplist);
} }
@ -51,7 +51,7 @@ export default class MapMenu {
} }
onMapClick = event => { onMapClick = event => {
const map = $(this).attr('map'); const map = $(event.target).attr('map');
this.bluemap.changeMap(map); this.bluemap.changeMap(map);
} }