Skip to content

Commit 6e34ea9

Browse files
committed
fixed ezraroi#8
1 parent ca0b750 commit 6e34ea9

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

dist/ngJsTree.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,14 @@
134134

135135
scope.destroy = function () {
136136
if (attrs.tree) {
137-
scope.tree = scope.$parent[attrs.tree] = elm;
137+
if (attrs.tree.indexOf('.') !== -1) {
138+
var split = attrs.tree.split('.');
139+
scope.tree = scope.$parent[split[0]][split[1]] = elm;
140+
}
141+
else {
142+
scope.tree = scope.$parent[attrs.tree] = elm;
143+
}
144+
138145
} else {
139146
scope.tree = elm;
140147
}

dist/ngJsTree.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ngJsTree.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,14 @@
134134

135135
scope.destroy = function () {
136136
if (attrs.tree) {
137-
scope.tree = scope.$parent[attrs.tree] = elm;
137+
if (attrs.tree.indexOf('.') !== -1) {
138+
var split = attrs.tree.split('.');
139+
scope.tree = scope.$parent[split[0]][split[1]] = elm;
140+
}
141+
else {
142+
scope.tree = scope.$parent[attrs.tree] = elm;
143+
}
144+
138145
} else {
139146
scope.tree = elm;
140147
}

0 commit comments

Comments
 (0)