Skip to content

Commit

Permalink
fix: Menu Crashes without content
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmistryamplience committed Oct 4, 2024
1 parent 16aec2d commit a3b5d72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/cms-modern/ContentBlock/ContentBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ const ContentBlock = ({
const [liveContent] = useContent(originalContent, vse);
const content = liveContent;
let paletteItem = false;
let Component = components[content._meta?.schema];
let Component = components[content?._meta?.schema];
if (!Component) {
Component = palettes[content.type];
Component = palettes[content?.type];
if (Component) paletteItem = true;
}
if (!liveContent && !paletteItem) {
Expand Down

0 comments on commit a3b5d72

Please sign in to comment.