Move sort after merge

This commit is contained in:
ganmor
2012-06-25 10:37:46 +02:00
parent cf805816e2
commit 6df4874f69

View File

@@ -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++) {