!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]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!ayah || !ms) {
|
||||
if (!ayah || typeof ms !== "number") {
|
||||
return;
|
||||
} else if (isStalled || isPaused) {
|
||||
/* no-op */
|
||||
|
|
Loading…
Reference in a new issue