Skip to content

Commit

Permalink
Update useMemo dependency array in index.tsx
Browse files Browse the repository at this point in the history
reading {isReady} from the hook object return doesn't currently update, at least when using the audio-reference pass through option.

I went through the code, and the first thing I found was line 120 containing the dependency array for the useMemo calculation. I'm pretty sure the dependency array needs to include isReady.
  • Loading branch information
psyfry authored Apr 3, 2024
1 parent 9f0dbbb commit 5c433cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function useWavesurferState(wavesurfer: WaveSurfer | null): {
isPlaying,
currentTime,
}),
[isPlaying, currentTime],
[isPlaying, currentTime, isReady],
)
}

Expand Down

0 comments on commit 5c433cb

Please sign in to comment.