www

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

commit 620b8abb2cd28d02b5be2ef14c4836e3c6fdf956
parent f14b1f250e8eb59659d028af3651d73f11d03b2d
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun, 13 Jan 2013 22:42:21 -0800

Merge pull request #222 from aurimasv/deepCopy

[Utilities] Deep copy `null` as `null`. Display object type in varDump
Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -914,7 +914,7 @@ Zotero.Utilities = { for(var i in obj) { if(!obj.hasOwnProperty(i)) continue; - if(typeof obj[i] === "object") { + if(typeof obj[i] === "object" && obj[i] !== null) { obj2[i] = Zotero.Utilities.deepCopy(obj[i]); } else { obj2[i] = obj[i]; @@ -1139,7 +1139,7 @@ Zotero.Utilities = { closeBrace = ']'; } - dumped_text += level_padding + "'" + item + "' => " + openBrace; + dumped_text += level_padding + "'" + item + "' => " + type + ' ' + openBrace; //only recurse if there's anything in the object, purely cosmetical try { for(var i in value) {