diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 552867bdb..434b18acd 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -658,6 +658,7 @@ Zotero.Translate.ItemGetter = function() { Zotero.Translate.ItemGetter.prototype = { "setItems":function(items) { this._itemsLeft = items; + this._itemsLeft.sort(function(a, b) { return a.id - b.id; }); this.numItems = this._itemsLeft.length; }, @@ -677,6 +678,7 @@ Zotero.Translate.ItemGetter.prototype = { } this._itemsLeft = Array.from(items.values()); + this._itemsLeft.sort(function(a, b) { return a.id - b.id; }); this.numItems = this._itemsLeft.length; }, @@ -687,6 +689,7 @@ Zotero.Translate.ItemGetter.prototype = { this._collectionsLeft = Zotero.Collections.getByLibrary(libraryID, true); } + this._itemsLeft.sort(function(a, b) { return a.id - b.id; }); this.numItems = this._itemsLeft.length; }), @@ -896,4 +899,4 @@ Zotero.Translate.ItemGetter.prototype = { return obj; } } -Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length }); \ No newline at end of file +Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length });