Pārlūkot izejas kodu

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

Johan Ahlen 7 gadi atpakaļ
vecāks
revīzija
7df4c16

+ 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()