diff --git a/module/misc.js b/module/misc.js index 104646bb..9ed3050e 100644 --- a/module/misc.js +++ b/module/misc.js @@ -166,9 +166,9 @@ export class Misc { } static firstConnectedGM() { - if (typeof(game.users) == "object") { - return game.users.find(u => u.isGM && u.active); - } + if (game.users?.activeGM) { + return game.users.activeGM + } return game.users.sort(Misc.ascending(u => u.id)).find(u => u.isGM && u.active); } static connectedGMs() {