Fix handling of errors when saving items to data store asynchronously

This commit is contained in:
Simon Kornblith 2013-08-15 13:43:14 -04:00
parent 318e5b2dd6
commit dde09c54a2

View file

@ -1304,8 +1304,6 @@ Zotero.Translate.Base.prototype = {
if(!this._waitingForRPC) this._detectTranslatorsCollected();
}
} else {
this._currentState = null;
// unset return value is equivalent to true
if(returnValue === undefined) returnValue = true;
@ -1328,6 +1326,8 @@ Zotero.Translate.Base.prototype = {
this._runHandler("error", error);
}
this._currentState = null;
// call handlers
this._runHandler("itemsDone", returnValue);
if(returnValue) {