Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section Styles: Fix error when blocks are deregistered #63252

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading