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

HUE-6567 [frontend] Avoid JS error on multiple bindings opening a bundle editor after a schedule editor

Enrico Berti преди 9 години
родител
ревизия
7c5a42d
променени са 2 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 1 0
      desktop/core/src/desktop/static/desktop/js/share.vm.js
  2. 1 0
      desktop/core/src/desktop/static/desktop/js/share2.vm.js

+ 1 - 0
desktop/core/src/desktop/static/desktop/js/share.vm.js

@@ -96,6 +96,7 @@ function initSharing(id, updateFunc) {
     updateFunc = function () {}
   }
   shareViewModel = new ShareViewModel(updateFunc);
+  ko.cleanNode($(id)[0]);
   ko.applyBindings(shareViewModel, $(id)[0]);
   shareViewModel.hasInitBeenCalled = true;
   return shareViewModel;

+ 1 - 0
desktop/core/src/desktop/static/desktop/js/share2.vm.js

@@ -99,6 +99,7 @@ function initSharing(id, updateFunc) {
     updateFunc = function () {}
   }
   shareViewModel = new ShareViewModel(updateFunc);
+  ko.cleanNode($(id)[0]);
   ko.applyBindings(shareViewModel, $(id)[0]);
   shareViewModel.hasInitBeenCalled = true;
   return shareViewModel;