Skip to content

Commit aa04ed7

Browse files
Fix: prevent auto-switch tab on refresh
1 parent 9e501a5 commit aa04ed7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/popup/SegmentListComponent.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
4848

4949
React.useEffect(() => {
5050
const hasSegments = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
51-
if (hasSegments) {
52-
setTab(SegmentListTab.Segments);
53-
} else {
51+
if (!hasSegments && props.segments.length > 0) {
5452
setTab(SegmentListTab.Chapter);
5553
}
5654
}, [props.videoID, props.segments]);

0 commit comments

Comments
 (0)