diff --git a/code/map_data.js b/code/map_data.js index 7fd954e2..ce69e61c 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -233,10 +233,13 @@ window.renderPortal = function(ent) { old.options.details = ent[2]; return; } - // there were changes, remove old portal - removeByGuid(ent[0]); } + // there were changes, remove old portal. Don’t put this in old, in + // case the portal changed level and findEntityInLeaflet doesn’t find + // it. + removeByGuid(ent[0]); + var latlng = [ent[2].locationE6.latE6/1E6, ent[2].locationE6.lngE6/1E6]; // pre-loads player names for high zoom levels