From cd39227af78e7e7a581f8ebeaef6874a24467180 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Tue, 9 Dec 2025 08:11:48 +0100 Subject: [PATCH] fix: prevent unsupported wakelock --- apps/client/src/features/keep-awake/useWakeLock.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/client/src/features/keep-awake/useWakeLock.ts b/apps/client/src/features/keep-awake/useWakeLock.ts index b260e08e9..4ce28a523 100644 --- a/apps/client/src/features/keep-awake/useWakeLock.ts +++ b/apps/client/src/features/keep-awake/useWakeLock.ts @@ -25,6 +25,11 @@ export function useWakelock() { const sentinel = wakeLockSentinelRef.current; if (!sentinel || sentinel.released) { wakeLockSentinelRef.current = null; + + if (!canUseWakeLock) { + return; + } + navigator.wakeLock .request('screen') .then((sentinel) => {