Fix crash dragging link

This commit is contained in:
pythongosssss
2023-04-15 12:03:12 +01:00
parent e703c93f22
commit 78de95b515
+1 -1
View File
@@ -205,7 +205,7 @@ app.registerExtension({
// Override file handling to allow drag & drop of SVG
const handleFile = app.handleFile;
app.handleFile = function (file) {
if (file.type === "image/svg+xml" || file.name.endsWith(".svg")) {
if (file && (file.type === "image/svg+xml" || file.name?.endsWith(".svg"))) {
const reader = new FileReader();
reader.onload = () => {
// Extract embedded workflow from desc tags