From 5ba1ae9ae4ce1b79a02f0d9ccfae6120c097b31e Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Thu, 13 Oct 2022 00:45:29 -0400 Subject: [PATCH] Remove trailing coma in promptMatrix when activeTags is empty --- ui/media/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/media/main.js b/ui/media/main.js index f2d8d7ae..0bcb2fc3 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -878,7 +878,10 @@ function getPrompts() { promptsToMake = promptsToMake.concat(promptPermutations) } }) - const promptTags = (activeTags.length > 0 ? activeTags.map(x => x.name).join(", ") : "") + if (activeTags.length <= 0) { + return promptsToMake + } + const promptTags = activeTags.map(x => x.name).join(", ") return promptsToMake.map((prompt) => `${prompt}, ${promptTags}`) }