diff --git a/packages/block-editor/src/components/colors/use-colors.js b/packages/block-editor/src/components/colors/use-colors.js index a2b378f447353..ffa2a32a21911 100644 --- a/packages/block-editor/src/components/colors/use-colors.js +++ b/packages/block-editor/src/components/colors/use-colors.js @@ -245,7 +245,7 @@ export default function __experimentalUseColors( while ( backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && - backgroundColorNode.parentNode === Node.ELEMENT_NODE + backgroundColorNode.parentNode.nodeType === Node.ELEMENT_NODE ) { backgroundColorNode = backgroundColorNode.parentNode; backgroundColor = getComputedStyle( backgroundColorNode )