From f033877f41db27f8cfb624c4465dbb2f11ee3a56 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 24 May 2012 12:10:18 +0000 Subject: [PATCH] fix a regression in Ox.TreeList --- source/Ox.UI/js/List/Ox.TreeList.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/List/Ox.TreeList.js b/source/Ox.UI/js/List/Ox.TreeList.js index dde2ffa0..d59cb85b 100644 --- a/source/Ox.UI/js/List/Ox.TreeList.js +++ b/source/Ox.UI/js/List/Ox.TreeList.js @@ -160,9 +160,13 @@ Ox.TreeList = function(options, self) { if (type == 'array' || type == 'object') { ret.title += Ox.toTitleCase(type) + ' [' + Ox.len(value) + ']'; - ret.items = Ox.sort(Ox.map(value, function(v, k) { - return parseData(k, v); - })); + ret.items = Ox.sort( + type == 'array' ? value.map(function(v, i) { + return parseData(i, v); + }) : Object.keys(value).map(function(k) { + return parseData(k, value[k]); + }) + ); } else { ret.title += ( type == 'function'