diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 9362be1b46..b77b2b0e8d 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1255,10 +1255,11 @@ Zotero.Utilities = { }, /** - * Converts an item from toArray() format to content=json format used by the server + * Converts an item from toArray() format to an array of items in + * the content=json format used by the server */ "itemToServerJSON":function(item) { - var newItem = {}; + var newItem = {}, newItems = [newItem]; var typeID = Zotero.ItemTypes.getID(item.itemType); if(!typeID) { @@ -1337,7 +1338,6 @@ Zotero.Utilities = { } else if(field === "notes") { // normalize notes var n = val.length; - var newNotes = newItem.notes = new Array(n); for(var j=0; j