@primer/doctocat-nextjs 0.0.0-20250626093303 → 0.0.0-20250626094237
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -150,17 +150,13 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
150
150
|
</Breadcrumbs.Item>
|
|
151
151
|
)}
|
|
152
152
|
{activePath.reduce((acc, item, index, items) => {
|
|
153
|
-
// Skip
|
|
154
|
-
// BUT ONLY if the index page doesn't have a custom tab-label
|
|
155
|
-
// AND the index page's title doesn't match the folder's title
|
|
153
|
+
// Skip duplicate item for index pages without tab-label
|
|
156
154
|
if (
|
|
157
155
|
index < items.length - 1 &&
|
|
158
156
|
items[index + 1].name === 'index' &&
|
|
159
157
|
item.route === items[index + 1].route &&
|
|
160
158
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
161
|
-
!items[index + 1].frontMatter?.['tab-label']
|
|
162
|
-
// Keep both when the titles match (don't skip the folder)
|
|
163
|
-
items[index + 1].title !== item.title
|
|
159
|
+
!items[index + 1].frontMatter?.['tab-label']
|
|
164
160
|
) {
|
|
165
161
|
return acc
|
|
166
162
|
}
|