Skip to content

Commit 9888dcc

Browse files
committed
Fix chapter import not working with 0 time
1 parent 49a166a commit 9888dcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/pageUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
7979
const description = link.querySelector("#details h4") as HTMLElement;
8080
if (timeElement && description?.innerText?.length > 0 && link.getAttribute("href")?.includes(currentVideoID)) {
8181
const time = GenericUtils.getFormattedTimeToSeconds(timeElement.innerText);
82-
if (!time) return [];
82+
if (time === null) return [];
8383

8484
if (lastSegment) {
8585
lastSegment.segment[1] = time;

0 commit comments

Comments
 (0)