Commit 8b5906c8 authored by JJ Kasper's avatar JJ Kasper Committed by Tim Neutkens

Add error catching to firefox url query workaround (#6833)

It appears this workaround sometimes throws a `NS_ERROR_NOT_AVAILABLE` so we add error handling for it
parent 533018f7
...@@ -82,7 +82,9 @@ export default class Router implements IRouterInterface { ...@@ -82,7 +82,9 @@ export default class Router implements IRouterInterface {
// TODO: let's remove this once the Firefox bug is resolved // TODO: let's remove this once the Firefox bug is resolved
if (navigator.userAgent && navigator.userAgent.match(/firefox/i)) { if (navigator.userAgent && navigator.userAgent.match(/firefox/i)) {
window.addEventListener('unload', () => { window.addEventListener('unload', () => {
if (window.location.search) window.location.replace(window.location.toString()) try {
if (window.location.search) window.location.replace(window.location.toString())
} catch (_) {/* since it's a workaround, ignore */}
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment