From 5cf7dda76c5743d37a0b0edc3fb12727171a3cfc Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 13 Jun 2024 21:51:31 +0200 Subject: [PATCH] Fix game.users for v12 --- module/misc.js | 3 +++ 1 file changed, 3 insertions(+) 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() {