diff --git a/public/scripts/extensions/variables/index.js b/public/scripts/extensions/variables/index.js index 2b473993a..478181b7d 100644 --- a/public/scripts/extensions/variables/index.js +++ b/public/scripts/extensions/variables/index.js @@ -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) {