jeromegn/Backbone.localStorage

Bug in "destroy" metod of localStorage.js

lica-mobilu opened this issue · 2 comments

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

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.

Opened a PR to address this issue.