Browse Source

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

Enrico Berti 8 years ago
parent
commit
7c5a42d

+ 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;