Merge pull request #322 from madrang/prompt-fix

Remove trailing coma in promptMatrix when activeTags is empty
This commit is contained in:
cmdr2 2022-10-13 10:36:27 +05:30 committed by GitHub
commit 93d1737357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}`)
}