From 386ab05b97a9c7c32007de7bd95aae0d3ef63297 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 7 May 2021 19:11:21 +0100 Subject: [PATCH] disabling config changing when race is about to start --- src/js/tribe/tribe.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/tribe/tribe.js b/src/js/tribe/tribe.js index da8ed902b..1d3f6b091 100644 --- a/src/js/tribe/tribe.js +++ b/src/js/tribe/tribe.js @@ -276,7 +276,7 @@ function applyRoomConfig(cfg) { } export function checkIfCanChangeConfig(mp) { - if (state >= 6) { + if (state >= 8) { if (state >= 20 && state < 29) { if (mp) return true; Notifications.add("You can't change settings during the test", 0, 1); @@ -285,11 +285,11 @@ export function checkIfCanChangeConfig(mp) { return true; } else { if (mp) return true; - if (room.private) { + if (room?.private) { Notifications.add("Only the leader can change this setting", 0, 1); return false; } else { - Notifications.add("You can't change settings when matchmaking", 0, 1); + Notifications.add("Race is about to start", 0, 1); return false; } }