Skip to content

Commit

Permalink
Revert weird firefox workaround (#6896)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Apr 4, 2019
1 parent 6528d19 commit 682b3ed
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/next-server/lib/router/router.ts
Expand Up @@ -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 */}
})
}
}
}

Expand Down

0 comments on commit 682b3ed

Please sign in to comment.