From 682b3ed7f582429bc0b6d6f9a0696ff0bea0a2d3 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Thu, 4 Apr 2019 15:35:20 -0500 Subject: [PATCH] Revert weird firefox workaround (#6896) --- packages/next-server/lib/router/router.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/next-server/lib/router/router.ts b/packages/next-server/lib/router/router.ts index 1f6a645af6..44e992d338 100644 --- a/packages/next-server/lib/router/router.ts +++ b/packages/next-server/lib/router/router.ts @@ -75,18 +75,6 @@ export default class Router implements IRouterInterface { this.changeState('replaceState', formatWithValidation({ pathname, query }), as) window.addEventListener('popstate', this.onPopState) - - // Workaround for weird Firefox bug, see below links - // https://github.com/zeit/next.js/issues/3817 - // https://bugzilla.mozilla.org/show_bug.cgi?id=1422334 - // TODO: let's remove this once the Firefox bug is resolved - if (navigator.userAgent && navigator.userAgent.match(/firefox/i)) { - window.addEventListener('unload', () => { - try { - if (window.location.search) window.location.replace(window.location.toString()) - } catch (_) {/* since it's a workaround, ignore */} - }) - } } }