Update src/optionsMenu/helpers/VUMeter.tsx
Co-authored-by: Marks Polakovs <github@markspolakovs.me>
This commit is contained in:
parent
76eedd365b
commit
db4335a543
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ export function VUMeter(props: VUMeterProps) {
|
|||
setPeakR(result[1]);
|
||||
}
|
||||
setTimeout((current = rafRef.current, a = animate) => {
|
||||
if (isMounted) current = requestAnimationFrame(a);
|
||||
if (isMounted) {
|
||||
current = requestAnimationFrame(a);
|
||||
}
|
||||
}, 1000 / FPS);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue