Skip to content

Commit 58e83a8

Browse files
fix(UNT-T30512): Issue #129 Handle division by 0
1 parent e71c116 commit 58e83a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/Waveform/Waveform.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const Waveform = forwardRef<IWaveformRef, IWaveform>((props, ref) => {
180180
const result = await extractWaveformData({
181181
path: path,
182182
playerKey: `PlayerFor${path}`,
183-
noOfSamples: noOfSample,
183+
noOfSamples: Math.max(noOfSample, 1),
184184
});
185185
(onChangeWaveformLoadState as Function)?.(false);
186186

0 commit comments

Comments
 (0)