mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-30 11:50:09 +02:00
Also check global variable names
This commit is contained in:
parent
372ac26080
commit
d5ed0f6cdf
@ -103,6 +103,10 @@ function getGlobalVariable(name, args = {}) {
|
||||
}
|
||||
|
||||
function setGlobalVariable(name, value, args = {}) {
|
||||
if (!name) {
|
||||
throw new Error('Variable name cannot be empty or undefined.');
|
||||
}
|
||||
|
||||
if (args.index !== undefined) {
|
||||
try {
|
||||
let globalVariable = JSON.parse(extension_settings.variables.global[name] ?? 'null');
|
||||
|
Loading…
x
Reference in New Issue
Block a user