Skip to content

Commit

Permalink
fix(studio): studio crash on undefined content item (#399)
Browse files Browse the repository at this point in the history
* fix(studio): studio crash on undefined content item

* add
  • Loading branch information
davidvitora committed Oct 24, 2022
1 parent e484773 commit 1f29187
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -54,7 +54,7 @@ const ContentItem = (props: Props) => {
// TODO replace this by typed components
const legacyHTMLRenderer = () => {
const preview = contentItem?.previews[props.contentLang] ?? ''
const textContent = escapeHtmlChars(`${lang.tr(contentItem.schema?.title)} | ${preview}`)
const textContent = escapeHtmlChars(`${lang.tr(contentItem?.schema?.title)} | ${preview}`)
const vars = {}

const htmlTpl = textContent.replace(/{{([a-z$@0-9. _-]*?)}}/gi, (x) => {
Expand Down

0 comments on commit 1f29187

Please sign in to comment.