mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Don't allow setting undefined variables
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user