Skip to content

Commit e92cef3

Browse files
committed
fix: === is more idiomatic
1 parent 0c245aa commit e92cef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/use-wake-lock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const useWakeLock = ({
5656
);
5757

5858
const release = React.useCallback(async () => {
59-
const isWakeLockUndefined = wakeLock.current == null;
59+
const isWakeLockUndefined = wakeLock.current === null;
6060
if (!isSupported) {
6161
return warn(
6262
"Calling the `release` function has no effect, Wake Lock Screen API isn't supported"
@@ -73,7 +73,7 @@ export const useWakeLock = ({
7373
React.useEffect(() => {
7474
if (reacquireOnPageVisible) {
7575
const handleVisibilityChange = async () => {
76-
if (wakeLock.current == null && document.visibilityState === 'visible') {
76+
if (wakeLock.current === null && document.visibilityState === 'visible') {
7777
try {
7878
wakeLock.current = await navigator.wakeLock.request('screen');
7979
} catch (error: any) {

0 commit comments

Comments
 (0)