!0 evaluates as true, returning early for a case we didn't expect
The if guard in this commit is aimed at catching null / undefined.
This commit is contained in:
parent
1d06b50300
commit
adfe95103e
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ export function Timer({
|
||||||
}, [ayah?.id]);
|
}, [ayah?.id]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!ayah || !ms) {
|
if (!ayah || typeof ms !== "number") {
|
||||||
return;
|
return;
|
||||||
} else if (isStalled || isPaused) {
|
} else if (isStalled || isPaused) {
|
||||||
/* no-op */
|
/* no-op */
|
||||||
|
|
Loading…
Reference in a new issue