fix: initWithArg

This commit is contained in:
2024-03-15 17:57:03 +00:00
parent 42e68f90ad
commit 1aee0f7881
+1 -1
View File
@@ -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");