Improve enforce
to also work before initialization of game
This commit is contained in:
parent
20226e30b1
commit
2b3dd9b859
2 changed files with 8 additions and 2 deletions
|
@ -15,3 +15,7 @@ export function getGame(): Game {
|
|||
}
|
||||
return game;
|
||||
}
|
||||
|
||||
export function getGameSafe(): Game | undefined {
|
||||
return game instanceof Game ? game : undefined;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue