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

getAll() fails if my localStorage contains non json-escaped strings #27

Closed
stropitek opened this issue Feb 19, 2016 · 4 comments
Closed

Comments

@stropitek
Copy link
Contributor

If any of my values in localStorage are non-valid json, I get the following error when calling Lockr.getAll()

image

Shouldn't we return missing; here ?

@tsironis
Copy link
Owner

Hey, can you provide a stacktrace and preferably some code that reproduces this bug?

@stropitek
Copy link
Contributor Author

Sure, I'll try to do this this evening

@tsironis
Copy link
Owner

Thank you!

@stropitek
Copy link
Contributor Author

Here's a jsfiddle: https://jsfiddle.net/stropitek/hc8ru0uz/2/

The problem seems to be the presence of characters that need to be escaped according to the json spec, for example double-quotes or tabulation.

@stropitek stropitek changed the title getAll() fails if my localStorage contains non-valid jsons getAll() fails if my localStorage contains non json-escaped strings Feb 20, 2016
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

No branches or pull requests

2 participants