Skip to content

Commit

Permalink
Fix: Global Styles crash in updateConfigWithSeparator when not block …
Browse files Browse the repository at this point in the history
…styles are passed. (#49045)
  • Loading branch information
jorgefilipecosta committed Mar 14, 2023
1 parent 56050d1 commit 2ba91cf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -973,10 +973,10 @@ export const getBlockSelectors = ( blockTypes, getBlockStyles ) => {
*/
function updateConfigWithSeparator( config ) {
const needsSeparatorStyleUpdate =
config.styles?.blocks[ 'core/separator' ] &&
config.styles?.blocks[ 'core/separator' ].color?.background &&
! config.styles?.blocks[ 'core/separator' ].color?.text &&
! config.styles?.blocks[ 'core/separator' ].border?.color;
config.styles?.blocks?.[ 'core/separator' ] &&
config.styles?.blocks?.[ 'core/separator' ].color?.background &&
! config.styles?.blocks?.[ 'core/separator' ].color?.text &&
! config.styles?.blocks?.[ 'core/separator' ].border?.color;
if ( needsSeparatorStyleUpdate ) {
return {
...config,
Expand Down

0 comments on commit 2ba91cf

Please sign in to comment.