mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-06 12:47:57 +01:00
Filter faulty prompt entries
This commit is contained in:
parent
e7198c6303
commit
85862d8b2e
@ -616,7 +616,7 @@ PromptManagerModule.prototype.renderPromptManager = function () {
|
|||||||
|
|
||||||
if (null !== this.activeCharacter) {
|
if (null !== this.activeCharacter) {
|
||||||
const prompts = [...this.serviceSettings.prompts]
|
const prompts = [...this.serviceSettings.prompts]
|
||||||
.filter(prompt => !prompt?.system_prompt)
|
.filter(prompt => prompt && !prompt?.system_prompt)
|
||||||
.sort((promptA, promptB) => promptA.name.localeCompare(promptB.name))
|
.sort((promptA, promptB) => promptA.name.localeCompare(promptB.name))
|
||||||
.reduce((acc, prompt) => acc + `<option value="${prompt.identifier}">${prompt.name}</option>`, '');
|
.reduce((acc, prompt) => acc + `<option value="${prompt.identifier}">${prompt.name}</option>`, '');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user