commit 0e46cdec10771cec66a198c22c303e32777bffc1 parent f0ff19fd05f6389eef2d83a58d9f5cc825029181 Author: Simon Kornblith <simon@simonster.com> Date: Sun, 7 Nov 2010 03:38:42 +0000 don't try to wrap null Diffstat:
| M | chrome/content/zotero/xpcom/translation/browser_firefox.js | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/translation/browser_firefox.js b/chrome/content/zotero/xpcom/translation/browser_firefox.js @@ -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);