mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-25 12:38:57 +02:00
fix(docs): Fix empty sidebar item category className
lost when post-processed to a doc (#11281)
This commit is contained in:
parent
068d4c63a9
commit
1cbc0118b0
10 changed files with 45 additions and 20 deletions
|
@ -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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue