From 24aff67d50ff64b14d0324a6e756f341ebd8dc5c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 7 Dec 2023 01:27:55 +0200 Subject: [PATCH] Fix {{original}} macro left out if original is empty --- public/scripts/PromptManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index e3f4db253..094fe49cc 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -1049,7 +1049,7 @@ class PromptManager { const groupMembers = this.getActiveGroupCharacters(); const preparedPrompt = new Prompt(prompt); - if (original) { + if (typeof original === 'string') { if (0 < groupMembers.length) preparedPrompt.content = substituteParams(prompt.content ?? '', null, null, original, groupMembers.join(', ')); else preparedPrompt.content = substituteParams(prompt.content, null, null, original); } else {