mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 13:58:06 -05:00
Move sort after merge
This commit is contained in:
@@ -619,7 +619,7 @@
|
||||
this.length += length;
|
||||
index = options.at != null ? options.at : this.models.length;
|
||||
splice.apply(this.models, [index, 0].concat(models));
|
||||
if (this.comparator && options.at == null) this.sort({silent: true});
|
||||
|
||||
|
||||
// Merge in duplicate models.
|
||||
if (options.merge) {
|
||||
@@ -629,6 +629,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.comparator && options.at == null) this.sort({silent: true});
|
||||
|
||||
if (options.silent) return this;
|
||||
for (i = 0, length = this.models.length; i < length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user