[openstreetmap/openstreetmap-website] Remove fallback code for undefined history.pushState() (PR #3828)

Anton Khorev notifications at github.com
Wed Dec 7 08:16:13 UTC 2022


There's a check if `window.history.pushState` is defined. If not, there's fallback code that uses `window.location` instead of `window.history`. Given our [current browser support](https://github.com/openstreetmap/openstreetmap-website/issues/3782) the fallback is unnecessary. `window.history.pushState` is supported by [ten years old browsers](https://caniuse.com/mdn-api_history_pushstate).
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3828

-- Commit Summary --

  * Remove fallback code for undefined history.pushState()

-- File Changes --

    M app/assets/javascripts/router.js (80)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3828.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3828.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3828
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3828 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221207/8adab4ec/attachment.htm>


More information about the rails-dev mailing list