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

2.0 incompatable with existing stored data? #3

Open
ainth opened this issue Aug 25, 2016 · 3 comments
Open

2.0 incompatable with existing stored data? #3

ainth opened this issue Aug 25, 2016 · 3 comments

Comments

@ainth
Copy link

ainth commented Aug 25, 2016

Upgrading to 2.0 from 1.0 causes the following error:
Uncaught (in promise) Unexpected token o in JSON at position 1 (in chrome)
Unhandled promise rejection – "JSON Parse error: Unexpected identifier \"object\"" (in safarI)

Have downgraded to 1.0

@mathieudutour
Copy link
Owner

yes, the state is now stringify and parsed automatically

@Strate
Copy link

Strate commented Feb 2, 2017

I think library should allow to gracefully update existing stored data. For example, test loaded data firstly to string, if so - JSON.parse it, else - keep it as is, on save it became string.

@mathieudutour
Copy link
Owner

PR welcome. That being said,1.0 -> 2.0 is a breaking change so you should expect some changes.

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

3 participants