persist-js icon indicating copy to clipboard operation
persist-js copied to clipboard

remove of an item returns this.getitem is not a function

Open bryanrasmussen opened this issue 10 years ago • 0 comments

I want to update the value of an item, I am not finding it possible to do this so I decided to remove it and write it again, in looking at that I got the following error

which returns TypeError: this.getItem is not a function ...key,fn,scope){var val;key=this.key(key);val=this.getItem(key);this.store.removeI... I narrowed down and found I just couldn't remove the item.

It is the correct data store and item I referring to.

I can provoke this with something as simple as

var store = new Persist.Store('external_img_store'); store.remove("urls");

however If I do store.get('urls', function (ok, val) { var currenturl_list; if (ok) { currenturl_list = val.split(","); console.log(currenturl_list); } });

I see all the urls I have stored in there.

Any ideas?

bryanrasmussen avatar Aug 13 '14 12:08 bryanrasmussen