Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
Co-authored-by: Samhir Tarif <[email protected]>
  • Loading branch information
stephenarra and samhirtarif authored Aug 31, 2024
1 parent 8ef6be8 commit d033fa5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/LiveAudioVisualizer/LiveAudioVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ const LiveAudioVisualizer: (props: Props) => ReactElement = ({
}, [analyser, context.state]);

useEffect(() => {
if (context.state !== "closed") {
context.close();
return () => {
if (context.state !== "closed") {
context.close();
}
}
}, []);

Expand Down

0 comments on commit d033fa5

Please sign in to comment.