Skip to content
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

Remove unchecked use of local storage again #8

Closed
wants to merge 2 commits into from

Conversation

cephalopodMD
Copy link

Accessing window.localStorage outside of a try catch block causes an exception in private browser sessions with 3rd party cookies disabled. We need to revert the change made for version 0.0.4.

if you access localstorage outside of a try catch as was done with versions > 0.0.3, webpacked bundles using this module will crash in a private browser with 3rd party cookies disabled
@coveralls
Copy link

Coverage Status

Coverage increased (+1.6%) to 91.071% when pulling 8f46e44 on cephalopodMD:master into f663c23 on bigpipe:master.

@cephalopodMD
Copy link
Author

@3rd-Eden could we consider taking in this PR? I saw there was a similar one from earlier this year that hasn't been taken. I thought that a revert might be more acceptable than adding new code.

This package gets included in many projects, including the winston logger package, which I'm using right now. Any bundle that includes this package will throw an uncaught exception and crash in an incognito chrome tab with 3rd party cookies disabled. I can fix this for my case by specifying 0.0.3 of this package in package.json, but I think it would be preferable to make sure that the default/latest version did not have this bug.

@3rd-Eden
Copy link
Owner

Fixed in master.

@3rd-Eden 3rd-Eden closed this Jan 29, 2020
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.

3 participants