Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
fix for issue jashkenas#4205
Browse files Browse the repository at this point in the history
  • Loading branch information
prma85 authored Feb 11, 2019
1 parent 27f7d41 commit 9959c26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@
// If this is a new, valid model, push it to the `toAdd` list.
} else if (add) {
model = models[i] = this._prepareModel(model, options);
if (model) {
var existing = this.get(model);
if (model && !!!existing) {
toAdd.push(model);
this._addReference(model, options);
modelMap[model.cid] = true;
Expand Down

0 comments on commit 9959c26

Please # to comment.