don't try to wrap null
This commit is contained in:
parent
f0ff19fd05
commit
0e46cdec10
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,9 @@ Zotero.Translate.SandboxManager.prototype = {
|
|||
attachTo[localKey] = function() {
|
||||
var args = (passAsFirstArgument ? [passAsFirstArgument] : []);
|
||||
for(var i=0; i<arguments.length; i++) {
|
||||
args.push(typeof arguments[i] === "object" || typeof arguments[i] === "function" ? new XPCSafeJSObjectWrapper(arguments[i]) : arguments[i]);
|
||||
args.push((typeof arguments[i] === "object" && arguments[i] !== null)
|
||||
|| typeof arguments[i] === "function"
|
||||
? new XPCSafeJSObjectWrapper(arguments[i]) : arguments[i]);
|
||||
}
|
||||
|
||||
return object[localKey].apply(object, args);
|
||||
|
|
Loading…
Add table
Reference in a new issue