From 0315e0a00aa6d38577244b0220f3143bee9a6dc8 Mon Sep 17 00:00:00 2001 From: imagoiq <12294151+imagoiq@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:43:42 +0200 Subject: [PATCH] Fix sonar code smell --- .../src/stories/utilities/markdown/CodeOrSourceMdx.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/src/stories/utilities/markdown/CodeOrSourceMdx.tsx b/packages/documentation/src/stories/utilities/markdown/CodeOrSourceMdx.tsx index a3b3fc73ec..bb3d9b48e9 100644 --- a/packages/documentation/src/stories/utilities/markdown/CodeOrSourceMdx.tsx +++ b/packages/documentation/src/stories/utilities/markdown/CodeOrSourceMdx.tsx @@ -8,7 +8,7 @@ export const CodeOrSourceMdx = ({ className, children, ...rest }) => { // markdown-to-jsx does not add className to inline code if ( typeof className !== 'string' && - (typeof children !== 'string' || !(children as string).match(/[\n\r]/g)) + (typeof children !== 'string' || !children.match(/[\n\r]/g)) ) { return {children}; }