Skip to content

Commit

Permalink
Add fail safe checks
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Mar 1, 2024
1 parent aa10d23 commit c16ef91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/OnboardingSPA/steps/SiteGen/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ const SiteGenPreview = () => {
const newPreviewSettings = cloneDeep( globalStyles[ 0 ] );
newPreviewSettings.settings.color.palette = data.color.palette;
const body =
data.styles?.blocks[ 0 ]?.[ 'core/body' ].typography.fontFamily;
data.styles?.blocks[ 0 ]?.[ 'core/body' ]?.typography
?.fontFamily;
const headings =
data.styles?.blocks[ 0 ]?.[ 'core/heading' ].typography
.fontFamily;
data.styles?.blocks[ 0 ]?.[ 'core/heading' ]?.typography
?.fontFamily;
if ( newPreviewSettings.styles.typography ) {
newPreviewSettings.styles.typography.fontFamily = body;
}
Expand Down

0 comments on commit c16ef91

Please sign in to comment.