fix(docs): Fix empty sidebar item category className lost when post-processed to a doc (#11281)

This commit is contained in:
Sébastien Lorber 2025-06-19 19:04:28 +02:00 committed by GitHub
parent 068d4c63a9
commit 1cbc0118b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 45 additions and 20 deletions

View file

@ -77,10 +77,13 @@ function postProcessSidebarItem(
) {
return null;
}
const {label, className, customProps} = category;
return {
type: 'doc',
label: category.label,
id: category.link.id,
label,
...(className && {className}),
...(customProps && {customProps}),
};
}
// A non-collapsible category can't be collapsed!