Merge pull request #596 from aurimasv/conn-reg

Fix regression from 0cd183613f
This commit is contained in:
Simon Kornblith 2015-01-07 20:10:34 -05:00
commit 541ebd1f22

View file

@ -240,7 +240,13 @@ Zotero.Translate.Sandbox = {
if(!Zotero.isBookmarklet) arg = JSON.parse(JSON.stringify(arg));
return translation.setSearch(arg);
};
safeTranslator.setDocument = function(arg) { return translation.setDocument(new XPCNativeWrapper(arg)) };
safeTranslator.setDocument = function(arg) {
if (Zotero.isFx && !Zotero.isBookmarklet) {
return translation.setDocument(new XPCNativeWrapper(arg));
} else {
return translation.setDocument(arg);
}
};
var errorHandlerSet = false;
safeTranslator.setHandler = function(arg1, arg2) {
if(arg1 === "error") errorHandlerSet = true;