Fix "TypeError: invalid 'in' operand arg" error introduced by d02fe6d9ab (thanks @adam3smith)

This commit is contained in:
Simon Kornblith 2012-07-08 13:04:09 -04:00
parent f07a42a7ec
commit b13d066062

View file

@ -103,8 +103,10 @@ Zotero.Translate.SandboxManager.Fx5DOMWrapper = function(obj, parent) {
var args = new Array(nArgs); var args = new Array(nArgs);
for(var i=0; i<nArgs; i++) { for(var i=0; i<nArgs; i++) {
var arg = arguments[i]; var arg = arguments[i];
args[i] = ((typeof arg === "object" || typeof arg === "function") args[i] = (((typeof arg === "object" && arg !== null)
&& "__wrappedDOMObject" in arg ? arg.__wrappedDOMObject : arg); || typeof arg === "function")
&& "__wrappedDOMObject" in arg
? arg.__wrappedDOMObject : arg);
} }
return Zotero.Translate.SandboxManager.Fx5DOMWrapper(obj.apply(parent ? parent : null, args)); return Zotero.Translate.SandboxManager.Fx5DOMWrapper(obj.apply(parent ? parent : null, args));
} }