diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 320e97164..ff47d1879 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -2452,7 +2452,9 @@ Zotero.Sync.Server.Data = new function() { }; if (type == 'item') { - io.dataIn.changedCreators = changedCreators; + if (!Zotero.Utilities.prototype.isEmpty(changedCreators)) { + io.dataIn.changedCreators = changedCreators; + } } var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 3e84aa499..a966e32aa 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -291,6 +291,20 @@ Zotero.Utilities.prototype.isInt = function(x) { } + +/** + * Test if an object is empty + * + * @param {Object} + */ +Zotero.Utilities.prototype.isEmpty = function (obj) { + for (var i in obj) { + return false; + } + return true; +} + + /** * Compares an array with another and returns an array with * the values from array2 that don't exist in array1