From 399f6c64eb1080f862cebdfa7c5389a0eef69be7 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 24 May 2023 11:02:40 +0900 Subject: [PATCH] [fix] lorebook loading when its blank --- src/ts/process/lorebook.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ts/process/lorebook.ts b/src/ts/process/lorebook.ts index 991b27b6..d4fa7467 100644 --- a/src/ts/process/lorebook.ts +++ b/src/ts/process/lorebook.ts @@ -127,9 +127,11 @@ export async function loadLoreBookPrompt(){ let firstKeyActivation = false for(const key of lore.keys){ - if(formatedChat.includes(key)){ - firstKeyActivation = true - break + if(key){ + if(formatedChat.includes(key)){ + firstKeyActivation = true + break + } } }