Improve enforce to also work before initialization of game

This commit is contained in:
Johannes Loher 2021-07-23 12:39:01 +02:00
parent 20226e30b1
commit 2b3dd9b859
2 changed files with 8 additions and 2 deletions

View file

@ -15,3 +15,7 @@ export function getGame(): Game {
}
return game;
}
export function getGameSafe(): Game | undefined {
return game instanceof Game ? game : undefined;
}