Small fix to copyObject

This commit is contained in:
Simon Kornblith 2014-09-01 12:26:36 -04:00
parent 9219100901
commit ee35f7df41

View File

@ -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;