fix: initWithArg
This commit is contained in:
@@ -95,7 +95,7 @@ export abstract class BaseCommand<ArgType extends Record<string, any>>{
|
|||||||
|
|
||||||
protected abstract init(): void;
|
protected abstract init(): void;
|
||||||
protected initWithArg(): void {
|
protected initWithArg(): void {
|
||||||
if (this.arg === undefined) {
|
if (Object.keys(this.arg).length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw new InvalidArgument("initWithArg must be overridden if arg is not undefined");
|
throw new InvalidArgument("initWithArg must be overridden if arg is not undefined");
|
||||||
|
|||||||
Reference in New Issue
Block a user