commit 257d6c51c332e12b4f3d61319c1855424432d092 parent c199065376c586a3bc1b754275fa3951c1585b3d Author: Sergej Orlov <wladimirych@gmail.com> Date: Thu, 26 Apr 2018 00:08:31 +0300 hashState: do not change history when settin hash (#60) Diffstat:
M | src/lib/leaflet.hashState/hashState.js | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/leaflet.hashState/hashState.js b/src/lib/leaflet.hashState/hashState.js @@ -81,8 +81,10 @@ const hashState = { } } } + const hash = stateItems.join('&'); + const href = `${location.origin}${location.pathname}${location.search}#${hash}`; this._ignoreChanges = true; - location.hash = stateItems.join('&'); + location.replace(href); this._ignoreChanges = false; },