Emit warning when double registering a space script function
parent
0940eb1d15
commit
ff9b39cb5e
|
@ -42,6 +42,9 @@ export class ScriptEnvironment {
|
|||
);
|
||||
arg = { name: arg };
|
||||
}
|
||||
if (this.functions[arg.name]) {
|
||||
console.warn(`Function ${arg.name} already registered, overwriting`);
|
||||
}
|
||||
this.functions[arg.name] = fn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue