瀏覽代碼

[spark] Fix JS error on second execute

Johan Ahlen 10 年之前
父節點
當前提交
d55a2a8
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      apps/spark/src/spark/templates/editor_components.mako

+ 2 - 0
apps/spark/src/spark/templates/editor_components.mako

@@ -457,7 +457,9 @@ from django.utils.translation import ugettext as _
 <script type="text/html" id="snippet-results">
   <!-- ko if: result.hasSomeResults() && result.type() != 'table' -->
   <div class="row-fluid" style="max-height: 400px; margin: 10px 0;">
+    <!-- ko if: result.data().length != 0 -->
     <pre data-bind="text: result.data()[0][1]"></pre>
+    <!-- /ko -->
   </div>
   <!-- /ko -->