Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

[Urgent!] Localstorage module clears *entire* localstorage #29

Closed
erikfried opened this issue Nov 26, 2015 · 7 comments
Closed

[Urgent!] Localstorage module clears *entire* localstorage #29

erikfried opened this issue Nov 26, 2015 · 7 comments

Comments

@erikfried
Copy link
Contributor

It uses the wrong localstorage api method, clear instead of removeItem.

The consequences can be quite catastrophical...

PR coming up soon.

Storage.removeItem() takes a single argument — the key of the data item you want to remove — and removes it from the storage object for that domain.
Storage.clear() takes no arguments, and simply empties the entire storage object for that domain.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API

@thogra
Copy link
Contributor

thogra commented Nov 26, 2015

😱

@Andersos
Copy link
Contributor

We have pulled in #30 and published a new version 2.1.1. How does it look?
We also deprecated 2.1.0 since it was the only version released to NPM before version 2.1.1.

@erikfried
Copy link
Contributor Author

@Andersos 👍 I already deployed this fix last week, using our forked version.

I´ll check and integrate this new release tomorrow.

@Andersos
Copy link
Contributor

Let me know if it works then we can close this issue =)

@erikfried
Copy link
Contributor Author

will do

@joawan
Copy link
Member

joawan commented Jan 18, 2016

This is merged and can be closed right?
If not, just ping and we'll open it

@joawan joawan closed this as completed Jan 18, 2016
@Andersos
Copy link
Contributor

This can be closed yes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants