Преглед на файлове

HUE-8659 [importer] Fix js exception with the field editor

Johan Ahlen преди 7 години
родител
ревизия
7df4c16
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      desktop/core/src/desktop/templates/ko_components/ko_simple_ace_editor.mako

+ 5 - 0
desktop/core/src/desktop/templates/ko_components/ko_simple_ace_editor.mako

@@ -824,6 +824,11 @@ from desktop.views import _ko
             positionStatement: ko.observable({
               location: { first_line: 1, last_line: 1, first_column: 0, last_column: editor.getValue().length }
             }),
+            whenContextSet: function() {
+              var promise = $.Deferred().resolve().promise();
+              promise.dispose = function () {};
+              return promise;
+            },
             isSqlDialect: ko.observable(true),
             aceCursorPosition: ko.observable(),
             inFocus: ko.observable()