Skip to content

Commit

Permalink
Merge pull request #133 from renfredxh/fix_destroy_collection
Browse files Browse the repository at this point in the history
Remove isNew check on store.destroy
  • Loading branch information
jeromegn committed Jun 13, 2014
2 parents c91acbc + 71f93d6 commit 6dce88b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions backbone.localStorage.js
Expand Up @@ -115,8 +115,6 @@ extend(Backbone.LocalStorage.prototype, {

// Delete a model from `this.data`, returning it.
destroy: function(model) {
if (model.isNew())
return false
this.localStorage().removeItem(this.name+"-"+model.id);
var modelId = model.id.toString();
for (var i = 0, id; i < this.records.length; i++) {
Expand Down

0 comments on commit 6dce88b

Please sign in to comment.