mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
fix: prevent unsupported wakelock
This commit is contained in:
committed by
Carlos Valente
parent
14e21214af
commit
cd39227af7
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user