www

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

commit 7b5d7bccf8d01634d626a93e29fbbd24fc929e5c
parent 8f0ec95e735807ace07f36e0cdf9a27dbf11ac11
Author: aurimasv <aurimas.dev@gmail.com>
Date:   Sat, 17 Mar 2012 00:59:04 -0500

Arrays are more appropriate here than strings.

Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1039,7 +1039,7 @@ Zotero.Utilities = { //initialise at first itteration if(!parentObjects) { parentObjects = [arr]; - path = '__ROOT__'; + path = ['ROOT']; } for (var item in arr) { @@ -1049,7 +1049,7 @@ Zotero.Utilities = { //check for recursion var i = parentObjects.indexOf(value); if(i != -1) { - var parentName = path.split('->').slice(0,i+1).join('->'); + var parentName = path.slice(0,i+1).join('->'); dumped_text += level_padding + "'" + item + "' => <<Reference to parent object " + parentName + " >>\n"; continue; } @@ -1064,7 +1064,7 @@ Zotero.Utilities = { dumped_text += level_padding + "'" + item + "' => " + openBrace; //only recurse if there's anything in the object, purely cosmetical for(var i in value) { - dumped_text += "\n" + arguments.callee(value,level+1,maxLevel,parentObjects.concat(value),path + '->' + item) + level_padding; + dumped_text += "\n" + arguments.callee(value,level+1,maxLevel,parentObjects.concat([value]),path.concat([item])) + level_padding; break; } dumped_text += closeBrace + "\n";