diff --git a/chrome/content/zotero/xpcom/translation/item_local.js b/chrome/content/zotero/xpcom/translation/item_local.js index ef13cdfc06..240c66ad94 100644 --- a/chrome/content/zotero/xpcom/translation/item_local.js +++ b/chrome/content/zotero/xpcom/translation/item_local.js @@ -132,7 +132,7 @@ Zotero.Translate.ItemSaver.prototype = { var parentIDs = [null]; var topLevelCollection; - while(collectionsToProcess) { + while(collectionsToProcess.length) { var collection = collectionsToProcess.shift(); var parentID = parentIDs.shift(); @@ -143,8 +143,9 @@ Zotero.Translate.ItemSaver.prototype = { var toAdd = []; - for each(child in collection.children) { - if(child.type == "collection") { + for(var i=0; i