Commit f6082579 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix: wakelock

parent 1c4e7f03
...@@ -60,10 +60,13 @@ ...@@ -60,10 +60,13 @@
console.log(err); console.log(err);
} }
wakeLock.addEventListener('release', () => { if (wakeLock) {
// the wake lock has been released // Add a listener to release the wake lock when the page is unloaded
console.log('Wake Lock released'); wakeLock.addEventListener('release', () => {
}); // the wake lock has been released
console.log('Wake Lock released');
});
}
}; };
if ('wakeLock' in navigator) { if ('wakeLock' in navigator) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment