From 9888dcc323191d652e88ab92f4ae381e50d9de53 Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 10 Oct 2022 23:37:48 -0400 Subject: [PATCH] Fix chapter import not working with 0 time --- src/utils/pageUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/pageUtils.ts b/src/utils/pageUtils.ts index ff25cac6..db18aae7 100644 --- a/src/utils/pageUtils.ts +++ b/src/utils/pageUtils.ts @@ -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;