Don't try to double-wrap objects

This commit is contained in:
Simon Kornblith 2012-04-16 00:29:23 -04:00
parent cab868482c
commit 5ca5b06ebc

View file

@ -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