Skip to content

Commit f7cde18

Browse files
committed
Fix portal data synchronization between cache and hooks
1 parent f71dc2b commit f7cde18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/code/portal_detail.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ var handleResponse = function (deferred, guid, data, success) {
7272
var ent = [guid, data.result[13], data.result];
7373
var portal = window.mapDataRequest.render.createPortalEntity(ent, 'detailed');
7474

75-
// Update cache with from current map
76-
cache.store(guid, portal.options.data);
77-
7875
deferred.resolve(portal.options.data);
7976
window.runHooks('portalDetailLoaded', { guid: guid, success: success, details: portal.options.data, ent: ent, portal: portal });
8077
} else {

core/code/portal_marker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ L.PortalMarker = L.CircleMarker.extend({
187187
L.setOptions(this, dataOptions);
188188

189189
this.setSelected();
190+
if (this.hasFullDetails()) {
191+
window.portalDetail.store(this.options.guid, this._details);
192+
}
190193
},
191194

192195
getDetails: function () {

0 commit comments

Comments
 (0)