We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ccdf67 commit 9e501a5Copy full SHA for 9e501a5
src/popup/SegmentListComponent.tsx
@@ -47,11 +47,11 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
47
}, []);
48
49
React.useEffect(() => {
50
- const hasNonChapter = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
51
- if (!hasNonChapter && props.segments.length > 0) {
52
- setTab(SegmentListTab.Chapter);
53
- } else {
+ const hasSegments = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
+ if (hasSegments) {
54
setTab(SegmentListTab.Segments);
+ } else {
+ setTab(SegmentListTab.Chapter);
55
}
56
}, [props.videoID, props.segments]);
57
0 commit comments