From 5dca7c9f4efa1a09fef096dc7ee64a4c4b716782 Mon Sep 17 00:00:00 2001 From: yucarl77 Date: Sat, 3 Sep 2022 14:28:41 +0800 Subject: [PATCH] fix: return logger error --- src/controllers/gamemode/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/gamemode/index.ts b/src/controllers/gamemode/index.ts index 751bf0f..3480866 100644 --- a/src/controllers/gamemode/index.ts +++ b/src/controllers/gamemode/index.ts @@ -15,7 +15,7 @@ export abstract class BaseGameMode extends AbstractGM { super(); OnGameModeInit((): void => { if (this.initialized) - this.logger.error( + return this.logger.error( new Error("[GameMode]: Cannot be initialized more than once") ); this.initialized = true; @@ -23,7 +23,7 @@ export abstract class BaseGameMode extends AbstractGM { }); OnGameModeExit((): void => { if (!this.initialized) - this.logger.error( + return this.logger.error( new Error("[GameMode]: Cannot be unload more than once") ); this.initialized = false;