From e14c9506b65096cb32aca0edd33ca75ead5729cc Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 9 May 2024 14:55:09 +0300 Subject: [PATCH] Revert entry post-process --- public/scripts/world-info.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index bcab078e4..5d9ae3ecc 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -2580,8 +2580,8 @@ async function checkWorldInfo(chat, maxContext) { } }); - const worldInfoBefore = WIBeforeEntries.join('\n'); - const worldInfoAfter = WIAfterEntries.join('\n'); + const worldInfoBefore = WIBeforeEntries.length ? WIBeforeEntries.join('\n') : ''; + const worldInfoAfter = WIAfterEntries.length ? WIAfterEntries.join('\n') : ''; if (shouldWIAddPrompt) { const originalAN = context.extensionPrompts[NOTE_MODULE_NAME].value;