mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
fix(theme): only set classname on ul elements if they have an existing class (#9099)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
9391a33c41
commit
c8e7ce33f5
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,11 @@ import type {Props} from '@theme/MDXComponents/Ul';
|
|||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function transformUlClassName(className?: string): string {
|
||||
function transformUlClassName(className?: string): string | undefined {
|
||||
// Fix https://github.com/facebook/docusaurus/issues/9098
|
||||
if (typeof className === 'undefined') {
|
||||
return undefined;
|
||||
}
|
||||
return clsx(
|
||||
className,
|
||||
// This class is set globally by GitHub/MDX. We keep the global class, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue