mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Convert value to string for echo. Fix return value
This commit is contained in:
parent
b1f68d886c
commit
e804f27368
@ -597,7 +597,7 @@ async function generateCallback(args, value) {
|
||||
}
|
||||
|
||||
async function echoCallback(args, value) {
|
||||
const safeValue = DOMPurify.sanitize(value || '');
|
||||
const safeValue = DOMPurify.sanitize(String(value) || '');
|
||||
if (safeValue === '') {
|
||||
console.warn('WARN: No argument provided for /echo command');
|
||||
return;
|
||||
@ -619,6 +619,7 @@ async function echoCallback(args, value) {
|
||||
toastr.info(safeValue, title);
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
async function addSwipeCallback(_, arg) {
|
||||
|
Loading…
Reference in New Issue
Block a user