Liu Song’s Projects


~/Projects/flow

git clone https://code.lsong.org/flow

Commit

Commit
3e435976175562babd3ded13cf25b759a3df53f0
Author
Nick O'Leary <[email protected]>
Date
2021-05-11 14:10:40 +0100 +0100
Diffstat
 packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js | 35 

Prevent error whilst drag/drop importing from leaving dropTarget visible
Fixes #2982


diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
index caffe5793b8e478765d8de829ee04e0219c85503..ded08b024a961797f7615cb08f75cbb387b9396f 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
@@ -1260,49 +1260,54 @@             .on("dragleave",function(event) {
                 hideDropTarget();
             })
             .on("drop",function(event) {
+    var activeLibraries = {};
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
 /**
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * Copyright JS Foundation and other contributors, http://js.foundation
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  *
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * you may not use this file except in compliance with the License.
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * Unless required by applicable law or agreed to in writing, software
  * Unless required by applicable law or agreed to in writing, software
-/**
+ *
  * distributed under the License is distributed on an "AS IS" BASIS,
  * Unless required by applicable law or agreed to in writing, software
- * Copyright JS Foundation and other contributors, http://js.foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
  * Unless required by applicable law or agreed to in writing, software
- * Copyright JS Foundation and other contributors, http://js.foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
 /**
  * Unless required by applicable law or agreed to in writing, software
- * Copyright JS Foundation and other contributors, http://js.foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
  * Copyright JS Foundation and other contributors, http://js.foundation
  * Unless required by applicable law or agreed to in writing, software
- * Copyright JS Foundation and other contributors, http://js.foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
  *
+                            reader.readAsText(file);
+                        }
                     }
+                } catch(err) {
+                    // Ensure any errors throw above doesn't stop the drop target from
+                    // being hidden.
                 }
                 hideDropTarget();
                 event.preventDefault();