diff --git a/web/scripts/ui.js b/web/scripts/ui.js index 49388ace3..f320f8401 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -534,8 +534,8 @@ export class ComfyUI { let filename = "workflow.json"; if (promptFilename.value) { filename = prompt("Save workflow as:", filename); - if (filename === null) return; - if (!filename.endsWith(".json")) { + if (!filename) return; + if (!filename.toLowerCase().endsWith(".json")) { filename += ".json"; } }