From df883feb45fa9c3438f92211806a869efb8fe504 Mon Sep 17 00:00:00 2001 From: Karun Date: Sat, 15 Apr 2023 07:53:14 -0400 Subject: [PATCH] better handle filename prompt Co-authored-by: missionfloyd --- web/scripts/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; } }