瀏覽代碼

HUE-7666 [editor] Presentation mode with variables shouldn't break the editor

Enrico Berti 8 年之前
父節點
當前提交
2fa4359
共有 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

@@ -2748,7 +2748,7 @@ var EditorViewModel = (function() {
                 _statement.push(line);
               }
             });
-            _snippet = new Snippet(self, _notebook, {type: options.editor_type, statement_raw: _statement.join('\n'), result: {}, name: _title.join('\n'), variables: _variables}, skipSession=true);
+            _snippet = new Snippet(self, _notebook, {type: options.editor_type, statement_raw: _statement.join('\n'), result: {}, name: _title.join('\n'), variables: ko.mapping.toJS(_variables)}, skipSession=true);
             _snippet.init();
             _notebook.presentationSnippets()[sql_statement.hashCode()] = _snippet;
           }