Fix large times when locale uses dots for chapter names

Fixes #1757
This commit is contained in:
Ajay 2023-05-24 19:06:38 -04:00
parent 20ab0768df
commit 6585a4e325

View file

@ -67,7 +67,7 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
const timeElement = link.querySelector("#time") as HTMLElement;
const description = link.querySelector("#details h4") as HTMLElement;
if (timeElement && description?.innerText?.length > 0 && link.getAttribute("href")?.includes(currentVideoID)) {
const time = getFormattedTimeToSeconds(timeElement.innerText.replace(".", ":"));
const time = getFormattedTimeToSeconds(timeElement.innerText.replace(/\./g, ":"));
if (time === null) return [];
if (lastSegment) {