-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: reacquire wake lock check after release #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reacquire wake lock check after release #280
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
jorisre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
|
@calebchiam Some tests are failing, can you have a look? |
|
@jorisre thanks for the quick review, dropped the old test, which is no longer relevant testing it further, will ping in a bit |
|
@jorisre fixed the deeper issue of this not calling |
|
🎉 This PR is included in version 3.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Context
Follow-up to #279.
#279 (comment)
Approach
Check that
wakeLock.current === nullbefore attempting to reacquire the lock.Instead of using the vanilla
await navigator.wakeLock.request('screen'), use the already-definedrequest()method to reacquire the lock. This ensures the release state and onRelease handlers are updated/called properly.