- Fix "creator.serialize() is not a function" sync error
- Added Zotero.Utilities.isEmpty(obj)
This commit is contained in:
parent
e84f7f6ef8
commit
fd1ac3104a
2 changed files with 17 additions and 1 deletions
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue