Skip to content

Commit c281c58

Browse files
authored
Merge pull request #177 from MEITREX/fix_short_video
VideoSide: Fix error when video only contains one section
2 parents a26624d + d998b61 commit c281c58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/courses/[courseId]/media/[mediaId]/VideoSide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function VideoSide({
131131

132132
const currentSegment = segments.find(
133133
(x, idx) =>
134-
segments.length - 2 === idx ||
134+
!segments[idx + 1] ||
135135
(segments[idx + 1].startTime ?? 0) > playbackPosition
136136
);
137137

0 commit comments

Comments
 (0)