Fix error in multiple item saving
This commit is contained in:
parent
b114266fb3
commit
ad04e96ad4
1 changed files with 3 additions and 1 deletions
|
@ -52,7 +52,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
// attempt to save to server on a timer
|
||||
if(me._timeoutID) clearTimeout(me._timeoutID);
|
||||
me._itemsToSaveToServer.push(item);
|
||||
setTimeout(function() { me._saveToServer() }, 2000);
|
||||
me._timeoutID = setTimeout(function() { me._saveToServer() }, 2000);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -123,6 +123,8 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
if(!status) {
|
||||
Zotero.Messaging.sendMessage("saveDialog_error", status);
|
||||
throw new Error("Translate: Save to server failed: "+message);
|
||||
} else {
|
||||
Zotero.debug("Translate: Save to server complete");
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue