Merge remote-tracking branch 'upstream/pull/3828'

This commit is contained in:
Tom Hughes 2022-12-07 18:19:27 +00:00
commit 0ecc9c67c5

View file

@ -101,7 +101,6 @@ OSM.Router = function (map, rts) {
var router = {};
if (window.history && window.history.pushState) {
$(window).on("popstate", function (e) {
if (!e.originalEvent.state) return; // Is it a real popstate event or just a hash change?
var path = window.location.pathname + window.location.search,
@ -139,15 +138,6 @@ OSM.Router = function (map, rts) {
window.history.replaceState(state, document.title, window.location);
}
};
} else {
router.route = router.replace = function (url) {
window.location.assign(url);
};
router.stateChange = function (state) {
if (state.center) window.location.replace(OSM.formatHash(state));
};
}
router.updateHash = function () {
var hash = OSM.formatHash(map);