diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index c450b607ef..4f96bb4859 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -179,12 +179,13 @@ Zotero.Translate.Sandbox = { */ "loadTranslator":function(translate, type) { const setDefaultHandlers = function(translate, translation) { - if(Zotero.Utilities.isEmpty(translation._handlers)) { - if(type !== "export") { - translation.setHandler("itemDone", function(obj, item) { - translate.Sandbox._itemDone(translate, item); - }); - } + if(type !== "export" + && (!translation._handlers['itemDone'] || !translation._handlers['itemDone'].length)) { + translation.setHandler("itemDone", function(obj, item) { + translate.Sandbox._itemDone(translate, item); + }); + } + if(!translation._handlers['selectItems'] || !translation._handlers['selectItems'].length) { translation.setHandler("selectItems", translate._handlers["selectItems"]); } }