Convert value to string for echo. Fix return value

This commit is contained in:
Cohee 2023-12-07 19:37:55 +02:00
parent b1f68d886c
commit e804f27368
1 changed files with 2 additions and 1 deletions

View File

@ -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) {