Skip to content

Commit

Permalink
Fix portal data synchronization between cache and hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Feb 13, 2025
1 parent f71dc2b commit f7cde18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/code/portal_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ var handleResponse = function (deferred, guid, data, success) {
var ent = [guid, data.result[13], data.result];
var portal = window.mapDataRequest.render.createPortalEntity(ent, 'detailed');

// Update cache with from current map
cache.store(guid, portal.options.data);

deferred.resolve(portal.options.data);
window.runHooks('portalDetailLoaded', { guid: guid, success: success, details: portal.options.data, ent: ent, portal: portal });
} else {
Expand Down
3 changes: 3 additions & 0 deletions core/code/portal_marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ L.PortalMarker = L.CircleMarker.extend({
L.setOptions(this, dataOptions);

this.setSelected();
if (this.hasFullDetails()) {
window.portalDetail.store(this.options.guid, this._details);
}
},

getDetails: function () {
Expand Down

0 comments on commit f7cde18

Please sign in to comment.