Skip to content

Commit

Permalink
apply delayed messages after docLayer.map is set
Browse files Browse the repository at this point in the history
which is done by addLayer, otherwise its possible to handle a
onViewInfoMsg before map is set

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: If6e6d15c90de129614bcc2b64705d0b51b5c4e83
  • Loading branch information
caolanm authored and Rash419 committed Oct 27, 2023
1 parent 8728cd5 commit c1db537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions browser/src/core/Socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -1377,11 +1377,11 @@ app.definitions.Socket = L.Class.extend({
});
}

if (docLayer !== null) {
this._handleDelayedMessages(docLayer);
}
this._map._docLayer = docLayer;
this._map.addLayer(docLayer);
// docLayer.map is set by addLayer and docLayer.map should be set before
// applying delayed messages
this._handleDelayedMessages(docLayer);
this._map.fire('doclayerinit');
}
else if (this._reconnecting) {
Expand Down

0 comments on commit c1db537

Please sign in to comment.