diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index ed558ff1d..7fda4f65f 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -4264,8 +4264,10 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) { if (scanState) { const text = successfulNewEntriesForRecursion .map(x => x.content).join('\n'); - buffer.addRecurse(text); - allActivatedText = (text + '\n' + allActivatedText); + if (text) { + buffer.addRecurse(text); + allActivatedText = (text + '\n' + allActivatedText); + } } else { logNextState('[WI] Scan done. No new entries to prompt. Stopping.'); }