Fix game.users for v12

This commit is contained in:
LeRatierBretonnien 2024-06-13 21:51:31 +02:00
parent 9bc2593b8c
commit 5cf7dda76c

View File

@ -166,6 +166,9 @@ export class Misc {
} }
static firstConnectedGM() { 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); return game.users.sort(Misc.ascending(u => u.id)).find(u => u.isGM && u.active);
} }
static connectedGMs() { static connectedGMs() {