Skip to content

Commit

Permalink
Formatting for getPresetsSvgFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lende committed Jan 13, 2022
1 parent cb6a6fa commit 59ad6d2
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,15 @@ function getPresetsSvgFilters( blockPresets = {} ) {
const presetByOrigin = get( blockPresets, metadata.path, {} );
return [ 'default', 'theme' ]
.filter( ( origin ) => presetByOrigin[ origin ] )
.flatMap( ( origin ) => {
return presetByOrigin[ origin ].map( ( preset ) => {
return (
<PresetSvgFilter
metadata={ metadata }
preset={ preset }
key={ preset.slug }
/>
);
} );
} );
.flatMap( ( origin ) =>
presetByOrigin[ origin ].map( ( preset ) => (
<PresetSvgFilter
metadata={ metadata }
preset={ preset }
key={ preset.slug }
/>
) )
);
}
);
}
Expand Down Expand Up @@ -381,9 +379,9 @@ export const toStyles = ( tree, blockSelectors ) => {

export function toSvgFilters( tree, blockSelectors ) {
const nodesWithSettings = getNodesWithSettings( tree, blockSelectors );
return nodesWithSettings.flatMap( ( { presets } ) =>
getPresetsSvgFilters( presets )
);
return nodesWithSettings.flatMap( ( { presets } ) => {
return getPresetsSvgFilters( presets );
} );
}

const getBlockSelectors = ( blockTypes ) => {
Expand Down

0 comments on commit 59ad6d2

Please sign in to comment.