mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
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.
|
||||
*/
|
||||
function setChatVariable(name, value) {
|
||||
if (name === undefined || value === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
const metadata = getContext().chatMetadata;
|
||||
|
||||
if (!metadata) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user