Update Timer/index.tsx
This commit is contained in:
parent
f939b2cc41
commit
4327e81a3a
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ export function Timer({
|
|||
const [ms, setMs] = useState<number | null>(null);
|
||||
const isStalled = audioStatus === "wait";
|
||||
|
||||
const getMs = () => {
|
||||
function getMs() {
|
||||
const fallback =
|
||||
audioStatus === null || audioStatus === "pause" || isNaN(audio.duration);
|
||||
if (fallback) {
|
||||
|
@ -36,7 +36,7 @@ export function Timer({
|
|||
console.info("timer: length determined by HTMLAudioElement");
|
||||
return audio.duration * 1000;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (ayah) {
|
||||
|
|
Loading…
Reference in a new issue