Skip to content

Commit

Permalink
fix: return logger error
Browse files Browse the repository at this point in the history
  • Loading branch information
dockfries committed Sep 3, 2022
1 parent 449dc8b commit 5dca7c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/gamemode/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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;
this.OnInit();
});
OnGameModeExit((): void => {
if (!this.initialized)
this.logger.error(
return this.logger.error(
new Error("[GameMode]: Cannot be unload more than once")
);
this.initialized = false;
Expand Down

0 comments on commit 5dca7c9

Please sign in to comment.