Closed dperezrada closed 5 years ago
I wrote a test to check if this was a problem in the current version. And I did a pull request with the test https://github.com/marcuswestin/store.js/pull/292 It seems that current version using each, doesn't have the problem when removing elements anymore.
When deleting or adding elements inside a foreach, or during the foreach. Is causing change in the length of the storage,
After this code runs, it leaves 50 elements (tested with localstorage).
Seen the implementation of localstorage, it's clear that this problem has to happen:
Maybe it could be solve with this, but not sure if there are other reasons to not do this.
Thanks in advance, this is a great library.