Skip to content

Commit

Permalink
fix: crash when failed to load stream info
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Jan 7, 2025
1 parent 17414a3 commit 4f1c8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<canvas id="preview" ref="preview" class="rounded-sm" />
<span
v-if="video.chapters.length > 1"
v-if="(video?.chapters?.length ?? 0) > 1"
class="mt-2 text-sm drop-shadow-[0_0_2px_white] -mb-2 .dark:drop-shadow-[0_0_2px_black]"
>
{{ video.chapters.findLast(chapter => chapter.start < currentTime)?.title }}
Expand Down

0 comments on commit 4f1c8e5

Please sign in to comment.