Skip to content

Commit 16a8fa5

Browse files
committed
fix #850
1 parent f725ce0 commit 16a8fa5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: src/blocks/section/components/background.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1099,24 +1099,24 @@ export const generateStylesForSectionBackground = ( {
10991099
: undefined;
11001100
styles[ '--smb-section--background-text-top' ] =
11011101
!! backgroundText?.position?.top &&
1102-
backgroundText.position.top.match( /^\d+$/ )
1103-
? `${ backgroundText.position.top }px`
1104-
: backgroundText.position.top;
1102+
backgroundText?.position?.top.match( /^\d+$/ )
1103+
? `${ backgroundText?.position?.top }px`
1104+
: backgroundText?.position?.top;
11051105
styles[ '--smb-section--background-text-right' ] =
11061106
!! backgroundText?.position?.right &&
11071107
backgroundText.position.right.match( /^\d+$/ )
1108-
? `${ backgroundText.position.right }px`
1109-
: backgroundText.position.right;
1108+
? `${ backgroundText?.position?.right }px`
1109+
: backgroundText?.position?.right;
11101110
styles[ '--smb-section--background-text-bottom' ] =
11111111
!! backgroundText?.position?.bottom &&
1112-
backgroundText.position.bottom.match( /^\d+$/ )
1113-
? `${ backgroundText.position.bottom }px`
1114-
: backgroundText.position.bottom;
1112+
backgroundText?.position?.bottom.match( /^\d+$/ )
1113+
? `${ backgroundText?.position?.bottom }px`
1114+
: backgroundText?.position?.bottom;
11151115
styles[ '--smb-section--background-text-left' ] =
11161116
!! backgroundText?.position?.left &&
1117-
backgroundText.position.left.match( /^\d+$/ )
1118-
? `${ backgroundText.position.left }px`
1119-
: backgroundText.position.left;
1117+
backgroundText?.position?.left.match( /^\d+$/ )
1118+
? `${ backgroundText?.position?.left }px`
1119+
: backgroundText?.position?.left;
11201120
}
11211121

11221122
return styles;

0 commit comments

Comments
 (0)