From 1aee0f788172b9f379aadec3521ef01e2fd38aaa Mon Sep 17 00:00:00 2001 From: Hide_D Date: Fri, 15 Mar 2024 17:57:03 +0000 Subject: [PATCH] fix: initWithArg --- @sammo/game_logic/src/Command/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@sammo/game_logic/src/Command/index.ts b/@sammo/game_logic/src/Command/index.ts index 590bbee..8ddeece 100644 --- a/@sammo/game_logic/src/Command/index.ts +++ b/@sammo/game_logic/src/Command/index.ts @@ -95,7 +95,7 @@ export abstract class BaseCommand>{ protected abstract init(): void; protected initWithArg(): void { - if (this.arg === undefined) { + if (Object.keys(this.arg).length == 0) { return; } throw new InvalidArgument("initWithArg must be overridden if arg is not undefined");