commit 4540edb622257c6f177d9aebb08216ee85792827
parent 5818935a321c7fcf152848a6e8617dbc31ed6dbd
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 7 Apr 2017 23:11:04 -0400
Fix breakage from 406f50a3
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js
@@ -162,8 +162,10 @@ Zotero.Translate.ItemSaver.prototype = {
}
}.bind(this));
- itemsDoneCallback(newItems.splice());
-
+ if (itemsDoneCallback) {
+ itemsDoneCallback(newItems.splice());
+ }
+
// Handle attachments outside of the transaction, because they can involve downloading
for (let item of standaloneAttachments) {
let newItem = yield this._saveAttachment(item, null, attachmentCallback);