From d52b5fb9479aea2555849edb19d4c83aefd839ed Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Thu, 7 Dec 2023 18:28:58 +0000 Subject: [PATCH] pass prev pipeResult through if result undefined --- public/scripts/slash-commands.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 4ff362e63..8588154c0 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1524,7 +1524,11 @@ async function executeSlashCommands(text, unescape = false) { unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || ''); } + let oldPipeResult = pipeResult; pipeResult = await result.command.callback(result.args, unnamedArg); + if (pipeResult === undefined && oldPipeResult !== undefined) { + pipeResult = oldPipeResult; + } if (result.command.interruptsGeneration) { interrupt = true;