Skip to content

Commit

Permalink
Filter out non-CSS styles before passing the array to transformStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini committed Oct 20, 2023
1 parent 80dfffc commit 05c3606
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-library/src/html/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export default function HTMLEditPreview( { content, isSelected } ) {
);

const styles = useMemo(
() => [ DEFAULT_STYLES, ...transformStyles( settingStyles ) ],
() => [
DEFAULT_STYLES,
...transformStyles(
settingStyles.filter( ( style ) => style.css )
),
],
[ settingStyles ]
);

Expand Down

0 comments on commit 05c3606

Please sign in to comment.