Skip to content

Commit

Permalink
Defensive handling of null values for color.palette and color.duotone
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jul 8, 2021
1 parent 4423ef4 commit 3f0fe72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/hooks/duotone.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ function DuotonePanel( { name, attributes, setAttributes } ) {

if (
! hasBlockSupport( name, 'color.__experimentalDuotone' ) ||
( duotonePalette?.length === 0 &&
colorPalette?.length === 0 &&
( ( ! duotonePalette || duotonePalette?.length === 0 ) &&
( ! colorPalette || colorPalette?.length === 0 ) &&
disableCustomColors )
) {
return null;
Expand Down

0 comments on commit 3f0fe72

Please sign in to comment.