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 and ramonjd committed Jul 18, 2023
1 parent cbe67e3 commit c13d613
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

0 comments on commit c13d613

Please sign in to comment.