From a3d82616860700695fe0f78f6165d85424f7c571 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Sun, 4 May 2025 08:52:35 +0800 Subject: [PATCH] fix: remove console log and update file extension handling for LoRA syntax. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/158 --- static/js/components/RecipeModal.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/static/js/components/RecipeModal.js b/static/js/components/RecipeModal.js index 5c81b242..e05e43bc 100644 --- a/static/js/components/RecipeModal.js +++ b/static/js/components/RecipeModal.js @@ -451,8 +451,6 @@ class RecipeModal { lorasListElement.innerHTML = '
No LoRAs associated with this recipe
'; this.recipeLorasSyntax = ''; } - - console.log(this.currentRecipe.loras); // Show the modal modalManager.showModal('recipeModal'); @@ -951,8 +949,8 @@ class RecipeModal { let loraSyntaxMatch = inputValue.match(/]+)(?::[^>]+)?>/); let fileName = loraSyntaxMatch ? loraSyntaxMatch[1] : inputValue.trim(); - // Remove any file extension if present - fileName = fileName.replace(/\.\w+$/, ''); + // Remove .safetensors extension if present + fileName = fileName.replace(/\.safetensors$/, ''); // Get the deleted lora data const deletedLora = this.currentRecipe.loras[loraIndex];