浏览代码

[jb] Fix broken page after reloading the Impala query details in the Job Browser

Johan Åhlén 4 年之前
父节点
当前提交
8e736670e5
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      desktop/core/src/desktop/js/ko/bindings/ko.clipboard.js

+ 2 - 5
desktop/core/src/desktop/js/ko/bindings/ko.clipboard.js

@@ -15,16 +15,13 @@
 // limitations under the License.
 
 import * as ko from 'knockout';
+import Clipboard from 'clipboard';
 
 ko.bindingHandlers.clipboard = {
   init: (element, valueAccessor) => {
-    if (!window.Clipboard) {
-      console.warn('ko.clipboard.js depends on window.Clipboard');
-      return;
-    }
     const options = valueAccessor() || {};
 
-    const clipboard = new window.Clipboard(element, {
+    const clipboard = new Clipboard(element, {
       target: options.target,
       text: options.text
     });