From 12f9bfe8951d001b978dec0bd9a288dd39e80400 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 8 Apr 2023 16:31:10 +0100 Subject: [PATCH] Better filename check --- web/scripts/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/scripts/app.js b/web/scripts/app.js index c2ba74b3..deb31f22 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -873,11 +873,11 @@ class ComfyApp { this.graph.configure(graphData); } catch (error) { let errorHint = ""; - // Try extracting filename to see if it was caused by an extension - const filename = error.fileName || (error.stack || "").match(/\/([\/\w-_\.]+\.js):(\d*):(\d*)/)?.[1]; + // Try extracting filename to see if it was caused by an extension script + const filename = error.fileName || (error.stack || "").match(/(\/extensions\/.*\.js)/)?.[1]; const pos = (filename || "").indexOf("/extensions/"); 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