Add warning to variables
This commit is contained in:
parent
5dec0901ac
commit
ad1da396e6
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue