www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a71f3bbdd877ac9ac99a8ac6748d660976e4ab72
parent 96de2add96e6eb79c5689a1a3af99233abe07611
Author: Simon Kornblith <simon@simonster.com>
Date:   Sat, 21 Jun 2014 12:50:30 -0400

Fix #504

Determine whether to copy objects by their constructor names, since the
prototypes do not necessarily match

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate_firefox.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -492,7 +492,7 @@ Zotero.Translate.SandboxManager.prototype = { */ "_copyObject":function(obj, wm) { if(typeof obj !== "object" || obj === null - || (obj.__proto__ !== Object.prototype && obj.__proto__ !== Array.prototype) + || (obj.constructor.name !== "Object" && obj.constructor.name !== "Array") || "__exposedProps__" in obj) { return obj; } @@ -503,7 +503,7 @@ Zotero.Translate.SandboxManager.prototype = { var prop1 = obj[i]; if(typeof prop1 === "object" && prop1 !== null - && (prop1.__proto__ === Object.prototype || prop1.__proto__ === Array.prototype)) { + && (prop1.constructor.name === "Object" || prop1.constructor.name === "Array")) { var prop2 = wm.get(prop1); if(prop2 === undefined) { prop2 = this._copyObject(prop1, wm);