1
0
Fork 0

Add warning to variables

This commit is contained in:
Pabloader 2026-04-28 21:47:40 +00:00
parent 5dec0901ac
commit ad1da396e6
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ export class Variables extends Component {
const currentValue = this.variables[key] ?? 0;
if (typeof currentValue === 'number' && typeof value === 'number') {
this.set({ key, value: currentValue + value });
} else {
console.warn(`[Variables] increment failed: ${key} is not a number`);
}
return this.variables;
}