commit ee35f7df41bda236309d08182a3c1b1e614b31fa parent 921910090154ca58aafab3fcfd868f3572844977 Author: Simon Kornblith <simon@simonster.com> Date: Mon, 1 Sep 2014 12:26:36 -0400 Small fix to copyObject Diffstat:
| M | chrome/content/zotero/xpcom/translation/translate_firefox.js | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -512,7 +512,7 @@ Zotero.Translate.SandboxManager.prototype = { "_copyObject":function(obj, wm) { if(!this._canCopy(obj)) return obj if(!wm) wm = new WeakMap(); - var obj2 = (obj instanceof Array ? this.sandbox.Array() : this.sandbox.Object()); + var obj2 = (obj.constructor.name === "Array" ? this.sandbox.Array() : this.sandbox.Object()); var wobj2 = obj2.wrappedJSObject ? obj2.wrappedJSObject : obj2; for(var i in obj) { if(!obj.hasOwnProperty(i)) continue;