From 2da618fdd701abafbce0dbffe6b5df49dd058004 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Fri, 3 May 2013 05:57:16 -0400 Subject: [PATCH] fix(model): fix issue in model pane where the first element of array models is undefined --- js/directives/jsonTree.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/directives/jsonTree.js b/js/directives/jsonTree.js index 7e9e4b8..d660222 100644 --- a/js/directives/jsonTree.js +++ b/js/directives/jsonTree.js @@ -21,12 +21,12 @@ angular.module('panelApp').directive('batJsonTree', function($compile) { var i; html += '
[ '; if (object.length > 0) { - html += buildDom(object[i]); + html += buildDom(object[0]); for (i = 1; i < object.length; i++) { - html += ',' + buildDom(object[i]); + html += ', ' + buildDom(object[i]); } } - html += ']
'; + html += ' ]'; } else if (object instanceof Object) { html += ' { '; for (prop in object) {