From dde09c54a201a4298815135cdd0eb76903992234 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 15 Aug 2013 13:43:14 -0400 Subject: [PATCH] Fix handling of errors when saving items to data store asynchronously --- chrome/content/zotero/xpcom/translation/translate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 1cc1df643b..7b0f527fca 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -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) {