Fix chapter import not working with 0 time

This commit is contained in:
Ajay
2022-10-10 23:37:48 -04:00
parent 49a166a6b2
commit 9888dcc323

View File

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