Skip to content

Commit

Permalink
Section Styles: Fix error when blocks are deregistered (WordPress#63252)
Browse files Browse the repository at this point in the history
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ndiego <[email protected]>
Co-authored-by: MadtownLems <[email protected]>
  • Loading branch information
5 people authored and huubl committed Jul 10, 2024
1 parent 7034be3 commit 6350c1b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
}
const variationSelector =
blockSelectors[ blockName ]
.styleVariationSelectors?.[ variationName ];
?.styleVariationSelectors?.[ variationName ];

// Process the variation's inner element styles.
// This comes before the inner block styles so the
Expand Down Expand Up @@ -700,18 +700,18 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
const variationBlockSelector = scopeSelector(
variationSelector,
blockSelectors[ variationBlockName ]
.selector
?.selector
);
const variationDuotoneSelector = scopeSelector(
variationSelector,
blockSelectors[ variationBlockName ]
.duotoneSelector
?.duotoneSelector
);
const variationFeatureSelectors =
scopeFeatureSelectors(
variationSelector,
blockSelectors[ variationBlockName ]
.featureSelectors
?.featureSelectors
);

const variationBlockStyleNodes =
Expand All @@ -728,10 +728,10 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
featureSelectors: variationFeatureSelectors,
fallbackGapValue:
blockSelectors[ variationBlockName ]
.fallbackGapValue,
?.fallbackGapValue,
hasLayoutSupport:
blockSelectors[ variationBlockName ]
.hasLayoutSupport,
?.hasLayoutSupport,
styles: variationBlockStyleNodes,
} );

Expand Down

0 comments on commit 6350c1b

Please sign in to comment.