Fix seekbar position for zero length audio (#9949)

This commit is contained in:
Michael Weimann
2023-01-23 17:28:31 +01:00
committed by GitHub
parent 51b4555106
commit ed06ed0185
5 changed files with 38 additions and 3 deletions
+4
View File
@@ -160,5 +160,9 @@ describe("numbers", () => {
const result = percentageOf(14.28, 10.2, 20.4);
expect(result).toBe(0.4);
});
it("should return 0 for values that cause a division by zero", () => {
expect(percentageOf(0, 0, 0)).toBe(0);
});
});
});