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