fix test not working

This commit is contained in:
Miodec 2025-12-26 15:01:00 +01:00
parent f8852583c7
commit 6a9aaefe5f

View file

@ -24,6 +24,7 @@ import {
getActiveFunboxNames,
} from "../../test/funbox/list";
import * as TribeState from "../../tribe/tribe-state";
import { CLIENT_STATE } from "../../tribe/types";
export async function handleTab(e: KeyboardEvent, now: number): Promise<void> {
if (Config.quickRestart === "tab") {
@ -145,7 +146,11 @@ async function handleFunboxes(
}
export async function onKeydown(event: KeyboardEvent): Promise<void> {
if (!TribeState.isRaceActive()) {
if (
TribeState.getState() === CLIENT_STATE.CONNECTED &&
TribeState.isInARoom() &&
!TribeState.isRaceActive()
) {
event.preventDefault();
return;
}