Don't allow setting undefined variables
This commit is contained in:
parent
41cc86af9f
commit
7f4a47c1b0
|
@ -26,6 +26,10 @@ function getChatVariable(name) {
|
||||||
* @param {any} value The value of the variable to set.
|
* @param {any} value The value of the variable to set.
|
||||||
*/
|
*/
|
||||||
function setChatVariable(name, value) {
|
function setChatVariable(name, value) {
|
||||||
|
if (name === undefined || value === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const metadata = getContext().chatMetadata;
|
const metadata = getContext().chatMetadata;
|
||||||
|
|
||||||
if (!metadata) {
|
if (!metadata) {
|
||||||
|
|
Loading…
Reference in New Issue