File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " gitbook " : patch
3
+ ---
4
+
5
+ Show tabs when there is a single section group present
Original file line number Diff line number Diff line change @@ -226,11 +226,13 @@ export function Header(props: {
226
226
/>
227
227
</ div >
228
228
) }
229
- { sections && sections . list . length > 1 && (
230
- < SiteSectionTabs
231
- sections = { encodeClientSiteSections ( context , sections ) }
232
- />
233
- ) }
229
+ { sections &&
230
+ ( sections . list . some ( ( s ) => s . object === 'site-section-group' ) || // If there's even a single group, show the tabs
231
+ sections . list . length > 1 ) && ( // Otherwise, show the tabs if there's more than one section
232
+ < SiteSectionTabs
233
+ sections = { encodeClientSiteSections ( context , sections ) }
234
+ />
235
+ ) }
234
236
</ div >
235
237
</ div >
236
238
</ div >
You can’t perform that action at this time.
0 commit comments