浏览代码

HUE-7722 [editor] Avoid JS error when user tries to execute zero queries in presentation mode

Enrico Berti 8 年之前
父节点
当前提交
2d43813f7c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 1 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -2411,7 +2411,7 @@ var EditorViewModel = (function() {
     };
 
     self.executeAll = function () {
-      if (self.isExecutingAll()) {
+      if (self.isExecutingAll() || self.snippets().length === 0) {
         return;
       }