X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/0af7af382b5cf0cb446fa1c0084d38609c543daf..349f05287a5b6fbb19f4c1638cc1d75ab258fb66:/src/lib/stores.js?ds=sidebyside diff --git a/src/lib/stores.js b/src/lib/stores.js index 7ada776..00b4195 100644 --- a/src/lib/stores.js +++ b/src/lib/stores.js @@ -34,7 +34,13 @@ export function refresh_page(pagename, params) { if (param_str) { param_str = '?' + param_str; } - window.history.pushState([], '', pagename + '.html' + param_str); + let new_url = pagename + '.html' + param_str; + + if (window.location.protocol.match(/^http/)) { + window.history.pushState([], '', new_url); + } else { + window.location.href = new_url; + } } page.set({ tab: pagename, params: params });