Don't allow setting undefined variables

This commit is contained in:
Cohee 2023-08-22 17:52:45 +03:00
parent 41cc86af9f
commit 7f4a47c1b0
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ function getChatVariable(name) {
* @param {any} value The value of the variable to set.
*/
function setChatVariable(name, value) {
if (name === undefined || value === undefined) {
return;
}
const metadata = getContext().chatMetadata;
if (!metadata) {