Skip to content

Commit

Permalink
fix(mdx-loader): properly unwrap mdxAdmonitionTitle placeholder (#8246)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Oct 26, 2022
1 parent 1077d8a commit e301523
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -19,10 +19,10 @@ function extractMDXAdmonitionTitle(children: ReactNode): {
React.isValidElement(item) &&
(item.props as {mdxType: string} | null)?.mdxType ===
'mdxAdmonitionTitle',
);
) as JSX.Element | undefined;
const rest = <>{items.filter((item) => item !== mdxAdmonitionTitle)}</>;
return {
mdxAdmonitionTitle,
mdxAdmonitionTitle: mdxAdmonitionTitle?.props.children,
rest,
};
}
Expand Down

0 comments on commit e301523

Please sign in to comment.