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

Clear followed by setItem doesn't work (if clear is using async await) #945

Open
geoidesic opened this issue Mar 31, 2020 · 1 comment
Open

Comments

@geoidesic
Copy link

geoidesic commented Mar 31, 2020

I've created a codesandbox to demonstrate the problem: https://codesandbox.io/s/localforage-clear-issue-945-8ip2z

Look at Vue.app methods. When you click the Reset Cache button it will clear the store but will not setItem afterwards due to the await keyword.

To get it to work, the await keyword must be removed. This is unexpected as the docs show an example indicating that this method supports promises: https://localforage.github.io/localForage/#data-api-clear

@geoidesic
Copy link
Author

Well. I'm confused. It wasn't working on codesandbox... but now it is working. Still not working in my app though.

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

1 participant