-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid error in some environments #638
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! Should we also set/remove a value like we did for local storage detection?
Thought of that, but opted for not doing it simply to avoid adding code whose purpose I don't really know. If you think it's worth doing, I can add that. |
20d409e
to
3fd6809
Compare
I rebased this today, and the build failed. Looks like three environments timed out before even trying to run the tests. Would it be possible to rerun the build, please? |
Done! |
if (typeof sessionStorage !== 'undefined') { | ||
SESSION_STORAGE_SUPPORTED = true; | ||
} | ||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to log any sort of message here or does just catching the error retain the functionality, so everything appears good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching the error retains the functionality, so everything appears good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teddyzeenny does this look good to you?
There seems to be a problem, in very specific circumstances, with the code that detects support for session storage:
To reproduce follow these steps:
loaded from a different domain
It's important that the Ember inspector is already open when you land on the page (hence step 4 before 5). Reloading the iframe page with the Ember inspector open also reproduces the problem.
This PR appears to fix the problem for me.