Commit 12f9bfe8 authored by pythongosssss's avatar pythongosssss
Browse files

Better filename check

parent 79ff7d67
...@@ -873,11 +873,11 @@ class ComfyApp { ...@@ -873,11 +873,11 @@ class ComfyApp {
this.graph.configure(graphData); this.graph.configure(graphData);
} catch (error) { } catch (error) {
let errorHint = ""; let errorHint = "";
// Try extracting filename to see if it was caused by an extension // Try extracting filename to see if it was caused by an extension script
const filename = error.fileName || (error.stack || "").match(/\/([\/\w-_\.]+\.js):(\d*):(\d*)/)?.[1]; const filename = error.fileName || (error.stack || "").match(/(\/extensions\/.*\.js)/)?.[1];
const pos = (filename || "").indexOf("/extensions/"); const pos = (filename || "").indexOf("/extensions/");
if (pos > -1) { if (pos > -1) {
errorHint = "This may be due to the following extension: " + filename.substring(pos + 12); errorHint = "This may be due to the following script: " + filename.substring(pos + 12);
} }
// Show dialog to let the user know something went wrong loading the data // Show dialog to let the user know something went wrong loading the data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment