Fix game.users for v12

This commit is contained in:
LeRatierBretonnien 2024-06-13 21:52:48 +02:00
parent 5cf7dda76c
commit d30226cb33

View File

@ -166,9 +166,9 @@ export class Misc {
} }
static firstConnectedGM() { static firstConnectedGM() {
if (typeof(game.users) == "object") { if (game.users?.activeGM) {
return game.users.find(u => u.isGM && u.active); return game.users.activeGM
} }
return game.users.sort(Misc.ascending(u => u.id)).find(u => u.isGM && u.active); return game.users.sort(Misc.ascending(u => u.id)).find(u => u.isGM && u.active);
} }
static connectedGMs() { static connectedGMs() {