Skip to content

Commit

Permalink
[Block Library - Post Terms]: Custom taxonomies do not show icons whe…
Browse files Browse the repository at this point in the history
…n transforming from the toolbar. (WordPress#51476)

* fix/post-terms-variations-transforms-icon

* Update packages/block-library/src/post-terms/hooks.js

Co-authored-by: Aki Hamano <[email protected]>

---------

Co-authored-by: Aki Hamano <[email protected]>
  • Loading branch information
2 people authored and sethrubenstein committed Jul 13, 2023
1 parent e4e558a commit 90e0b2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/post-terms/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default function enhanceVariations( settings, name ) {
}
const variations = settings.variations.map( ( variation ) => ( {
...variation,
...( variationIconMap[ variation.name ] && {
icon: variationIconMap[ variation.name ],
} ),
...{
icon: variationIconMap[ variation.name ] ?? postCategories,
},
} ) );
return {
...settings,
Expand Down

0 comments on commit 90e0b2c

Please sign in to comment.