Skip to content

Commit 2f4437e

Browse files
committed
Only for this section
1 parent b51bee9 commit 2f4437e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/gitbook/src/components/SiteSections/encodeClientSiteSections.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,17 @@ function shouldIncludeSection(context: GitBookSiteContext, section: SiteSection)
7272
// Testing for a new mode of navigation where the multi-variants section are hidden
7373
// if they do not include an equivalent of the current site space.
7474

75-
const { siteSpace: currentSiteSpace } = context;
75+
// TODO: replace with a proper flag on the section
76+
const withNavigateOnlyIfEquivalent = section.id === 'sitesc_4jvEm';
7677

77-
if (section.siteSpaces.length === 1) {
78+
if (!withNavigateOnlyIfEquivalent) {
7879
return true;
7980
}
8081

82+
const { siteSpace: currentSiteSpace } = context;
83+
if (section.siteSpaces.length === 1) {
84+
return true;
85+
}
8186
return section.siteSpaces.some((siteSpace) =>
8287
areSiteSpacesEquivalent(siteSpace, currentSiteSpace)
8388
);

0 commit comments

Comments
 (0)