aboutsummaryrefslogtreecommitdiff
path: root/js/components/treeview
diff options
context:
space:
mode:
authorEric Guzman2012-02-15 21:51:28 -0800
committerEric Guzman2012-02-15 21:51:28 -0800
commit23071f9cb32e1783d8c0aa960a8407e9024876c9 (patch)
tree7491ab1ed56d242a4856243fdf940a548e540b21 /js/components/treeview
parentd366c0bd1af6471511217ed574083e15059519b5 (diff)
downloadninja-23071f9cb32e1783d8c0aa960a8407e9024876c9.tar.gz
Tree Node - fix for applying tree child nodes array twice (and getting duplicates)
Diffstat (limited to 'js/components/treeview')
-rw-r--r--js/components/treeview/tree-node.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/components/treeview/tree-node.js b/js/components/treeview/tree-node.js
index 689fc233..d7b864b5 100644
--- a/js/components/treeview/tree-node.js
+++ b/js/components/treeview/tree-node.js
@@ -44,7 +44,9 @@ exports.TreeNode = Montage.create(Component, {
44 if(!object) { 44 if(!object) {
45 return; 45 return;
46 } 46 }
47
47 if(object[this.branchKey]) { 48 if(object[this.branchKey]) {
49 this.childNodes.length = 0;
48 object[this.branchKey].forEach(function(node) { 50 object[this.branchKey].forEach(function(node) {
49 this.childNodes.push(node); 51 this.childNodes.push(node);
50 }, this); 52 }, this);