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

Catch errors accessing localStorage #7

Closed
wants to merge 1 commit into from
Closed

Conversation

tgds
Copy link

@tgds tgds commented Feb 25, 2019

It's actually possible that reading window.localStorage fails in some circumstances. Notably in Electron preload script (page is not loaded yet and localStorage is bound to the page origin and does not exist on about://blank), where it fails with Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

Just moving the try/catch block up to catch this.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 87.931% when pulling b317a84 on tgds:master into f663c23 on bigpipe:master.

@3rd-Eden
Copy link
Owner

Fixed in 0.0.6

@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.

None yet

3 participants