Skip to content

Commit 2da618f

Browse files
committed
fix(model): fix issue in model pane where the first element of array models is undefined
1 parent d0fa314 commit 2da618f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/directives/jsonTree.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ angular.module('panelApp').directive('batJsonTree', function($compile) {
2121
var i;
2222
html += '<div class="scope-branch">[ ';
2323
if (object.length > 0) {
24-
html += buildDom(object[i]);
24+
html += buildDom(object[0]);
2525
for (i = 1; i < object.length; i++) {
26-
html += ',' + buildDom(object[i]);
26+
html += ', ' + buildDom(object[i]);
2727
}
2828
}
29-
html += ']</div>';
29+
html += ' ]</div>';
3030
} else if (object instanceof Object) {
3131
html += ' { ';
3232
for (prop in object) {

0 commit comments

Comments
 (0)