Fix some more Fx 32 issues

Ref https://forums.zotero.org/discussion/37885/
This commit is contained in:
Simon Kornblith 2014-07-06 14:07:00 -04:00
parent d9720f18a9
commit 87a0df43d8

View File

@ -513,7 +513,7 @@ Zotero.Translate.SandboxManager.prototype = {
if(!this._canCopy(obj)) return obj if(!this._canCopy(obj)) return obj
if(!wm) wm = new WeakMap(); if(!wm) wm = new WeakMap();
var obj2 = (obj instanceof Array ? this.sandbox.Array() : this.sandbox.Object()); var obj2 = (obj instanceof Array ? this.sandbox.Array() : this.sandbox.Object());
if(obj2.wrappedJSObject) obj2 = obj2.wrappedJSObject; var wobj2 = obj2.wrappedJSObject ? obj2.wrappedJSObject : obj2;
for(var i in obj) { for(var i in obj) {
if(!obj.hasOwnProperty(i)) continue; if(!obj.hasOwnProperty(i)) continue;
@ -524,9 +524,9 @@ Zotero.Translate.SandboxManager.prototype = {
prop2 = this._copyObject(prop1, wm); prop2 = this._copyObject(prop1, wm);
wm.set(prop1, prop2); wm.set(prop1, prop2);
} }
obj2[i] = prop2; wobj2[i] = prop2;
} else { } else {
obj2[i] = prop1; wobj2[i] = prop1;
} }
} }
return obj2; return obj2;