Handle empty strings in code blocks
Signed-off-by: irma12 <irma@roadie.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Handle empty code blocks in markdown files so they don't fail rendering
|
||||
@@ -65,8 +65,8 @@ type Props = {
|
||||
};
|
||||
|
||||
const renderers = {
|
||||
code: ({ language, value }: { language: string; value: string }) => {
|
||||
return <CodeSnippet language={language} text={value} />;
|
||||
code: ({ language, value }: { language: string; value?: string }) => {
|
||||
return <CodeSnippet language={language} text={value ?? ''} />;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user