Skip to content

Commit 7ab838d

Browse files
authored
Log unsupported Wake Lock API to console
1 parent 064aa45 commit 7ab838d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/public/transcription/useWakeLock.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export const useWakeLock = () => {
99
const wakeLockRef = useRef<WakeLockSentinel | null>(null)
1010

1111
useEffect(() => {
12-
if (!('wakeLock' in navigator)) return
12+
if (!('wakeLock' in navigator)) {
13+
console.log('useWakeLock: Screen Wake Lock API is not supported in this browser.')
14+
return
15+
}
1316

1417
const acquire = async () => {
1518
try {

0 commit comments

Comments
 (0)