jeromegn / Backbone.localStorage

A localStorage adapter for Backbone.js
MIT License
1.9k stars 681 forks source link

Bug in "destroy" metod of localStorage.js #225

Closed lica-mobilu closed 3 years ago

lica-mobilu commented 6 years ago

When removing an item from localStorage the ID is nor removed from the collection. The line with issues is this: var newRecords = (0, _underscore.without)(this.records, model); I have replaced it with this and now all works: var newRecords = (0, _underscore.without)(this.records, model.id + ''); Regards, Bogdan

scott-w commented 6 years ago

Hi @lica-mobilu that's excellent work! Can you open a PR with this change and I'll be able to put a new release in.

johnhelmuth commented 6 years ago

Opened a PR to address this issue.