mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-04 11:57:44 +01:00
pass prev pipeResult through if result undefined
This commit is contained in:
parent
5a719d635a
commit
d52b5fb947
@ -1524,7 +1524,11 @@ async function executeSlashCommands(text, unescape = false) {
|
|||||||
unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || '');
|
unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let oldPipeResult = pipeResult;
|
||||||
pipeResult = await result.command.callback(result.args, unnamedArg);
|
pipeResult = await result.command.callback(result.args, unnamedArg);
|
||||||
|
if (pipeResult === undefined && oldPipeResult !== undefined) {
|
||||||
|
pipeResult = oldPipeResult;
|
||||||
|
}
|
||||||
|
|
||||||
if (result.command.interruptsGeneration) {
|
if (result.command.interruptsGeneration) {
|
||||||
interrupt = true;
|
interrupt = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user