Merge pull request #1706 from LenAnderson/vars-fix-addvar-array

fix addvar on array using setGlobalVariable
This commit is contained in:
Cohee
2024-01-17 11:11:17 +02:00
committed by GitHub

View File

@@ -116,7 +116,7 @@ function addLocalVariable(name, value) {
const parsedValue = JSON.parse(currentValue); const parsedValue = JSON.parse(currentValue);
if (Array.isArray(parsedValue)) { if (Array.isArray(parsedValue)) {
parsedValue.push(value); parsedValue.push(value);
setGlobalVariable(name, JSON.stringify(parsedValue)); setLocalVariable(name, JSON.stringify(parsedValue));
return parsedValue; return parsedValue;
} }
} catch { } catch {