mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 08:38:53 +01:00
clear onProgress before closure for no progress
This commit is contained in:
parent
ad04d0c9a2
commit
0d9843cdd6
@ -2242,9 +2242,9 @@ async function echoCallback(args, value) {
|
||||
if (args.onClick) {
|
||||
if (args.onClick instanceof SlashCommandClosure) {
|
||||
options.onclick = async () => {
|
||||
// Execute the slash command directly, with its internal scope and everything. Clear progress at the end if the main script is already done.
|
||||
// Execute the slash command directly, with its internal scope and everything. Clear progress handler so it doesn't interfere with command execution progress.
|
||||
args.onClick.onProgress = null;
|
||||
await args.onClick.execute();
|
||||
await clearCommandProgress();
|
||||
};
|
||||
} else {
|
||||
toastr.warning('Invalid onClick provided for /echo command. This is not a closure');
|
||||
|
Loading…
x
Reference in New Issue
Block a user