Skip to content

Commit

Permalink
fix(theme): only set classname on ul elements if they have an existin…
Browse files Browse the repository at this point in the history
…g class (#9099)

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
  • Loading branch information
3 people committed Sep 20, 2023
1 parent e531891 commit 471330d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 471330d

Please sign in to comment.