Ver Fonte

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

Johan Åhlén há 4 anos atrás
pai
commit
8e736670e5

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

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