Skip to content

Commit

Permalink
Avoid copying global style presets via the styles compatibility hook (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jul 17, 2023
1 parent 5e44d3d commit 32278f0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export function useCompatibilityStyles() {
return accumulator;
}

// Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
if ( ! ownerNode.id ) {
return accumulator;
}

function matchFromRules( _cssRules ) {
return Array.from( _cssRules ).find(
( {
Expand Down

1 comment on commit 32278f0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 32278f0.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5573861328
📝 Reported issues:

Please sign in to comment.