浏览代码

HUE-7234 [editor] New variable should be empty

jdesjean 8 年之前
父节点
当前提交
ba90027
共有 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

@@ -652,7 +652,7 @@ var EditorViewModel = (function() {
         var variable = self.variables()[index];
         variable.name(item.name);
         variable.defaultValue(item.defaultValue);
-        variable.value(self.variableValues[item.name] || variable.value() || "");
+        variable.value(self.variableValues[item.name] || (!needsMore && variable.value()) || "");
       });
     });
     self.statement = ko.computed(function () {