From 5ca5b06ebc338523b445919a07f6ac278ea2f548 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 16 Apr 2012 00:29:23 -0400 Subject: [PATCH] Don't try to double-wrap objects --- chrome/content/zotero/xpcom/translation/translate_firefox.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index a42da9d267..a3581dede4 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -322,7 +322,10 @@ Zotero.Translate.DOMWrapper = new function() { * @param {XPCCrossOriginWrapper} obj * @return {Object} An obj that is no longer Xrayed */ - this.wrap = wrapPrivileged; + this.wrap = function(obj, overrides) { + if(isWrapper(obj)) return obj; + return wrapPrivileged(obj, overrides); + }; /** * Unwraps an object