소스 검색

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

Enrico Berti 8 년 전
부모
커밋
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;