Skip to content

Conversation

labaneilers
Copy link
Contributor

Bug: Accessing window.sessionStorage throws an exception in some browsers (including Chrome) when cookies/localStorage are explicitly disabled. This causes history.js to completely die because one of the very first things it does is to check sessionStorage availability outside of a try/catch.

To reproduce:

  1. In Chrome, disable cookies.
  2. Hit any page with history.js
  3. Note that an exception is thrown when accessing window.sessionStorage

@labaneilers
Copy link
Contributor Author

I just realized my fix is practically identical to startswithaj's (should have checked the pull requests first- d'oh), except that I ran buildr afterwards and updated the compressed and uncompressed bundles.

ghost pushed a commit that referenced this pull request Dec 4, 2013
window.sessionStorage throws an exception when cookies are disabled in some browsers
@ghost ghost merged commit 452d495 into browserstate:master Dec 4, 2013
@ghost
Copy link

ghost commented Dec 4, 2013

Thank you!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants