Skip to content

Commit

Permalink
[Block Library - Query Loop]: Fix variation with declaredicon objec…
Browse files Browse the repository at this point in the history
…t with `src` (#44270)
  • Loading branch information
ntsekouras authored Sep 20, 2022
1 parent dc57581 commit 8bbbba3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/query/edit/query-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export default function QueryPlaceholder( {
);

const matchingVariation = getMatchingVariation( attributes, allVariations );
const icon = matchingVariation?.icon || blockType?.icon?.src;
const icon =
matchingVariation?.icon?.src ||
matchingVariation?.icon ||
blockType?.icon?.src;
const label = matchingVariation?.title || blockType?.title;
if ( isStartingBlank ) {
return (
Expand Down

0 comments on commit 8bbbba3

Please sign in to comment.