0
0
Fork 0

Prevent error if options is not defined.

This commit is contained in:
Oliver-Akins 2021-01-07 15:33:37 -07:00
parent 9689b23007
commit 76e667142f

View file

@ -23,7 +23,7 @@ export class Game {
this.host = host;
this.ingame = false;
this.players = [host];
this.id = options.id || Game.generateID(conf.game.code_length);
this.id = options?.id || Game.generateID(conf.game.code_length);
// If the object is being instantiated from JSON we don't want to do
// any of the stuff that requires weird per-game stuff