Skip to content

Commit

Permalink
use portal detail cache on new portal entities
Browse files Browse the repository at this point in the history
  • Loading branch information
le-jeu committed Feb 17, 2021
1 parent 2ad9b21 commit 86fcc1a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/code/map_data_render.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ window.Render.prototype.createPortalEntity = function(ent, details) {
} else {
marker = createMarker(latlng, data);

// in case of incomplete data while having fresh details in cache, update the portal with those details
if (portalDetail.isFresh(guid)) {
var oldDetails = portalDetail.get(guid);
if (marker.willUpdate(oldDetails))
marker.updateDetails(oldDetails);
}

window.runHooks('portalAdded', {portal: marker});

window.portals[data.guid] = marker;
Expand Down

0 comments on commit 86fcc1a

Please sign in to comment.