From 99c653c1ef5b9bf0f9eefc7b7dd7420d2dc49222 Mon Sep 17 00:00:00 2001 From: Gareth Elwell Date: Fri, 23 Aug 2024 17:00:32 +0100 Subject: [PATCH] fix: ensure invalid or undefined colours fall back to set value as an empty string --- src/editor/components/StylesColor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/components/StylesColor.js b/src/editor/components/StylesColor.js index 19b298d..ea5113d 100644 --- a/src/editor/components/StylesColor.js +++ b/src/editor/components/StylesColor.js @@ -28,7 +28,7 @@ const Color = ( { selector } ) => { config = set( config, [ selector, key ].join( '.' ), - hexToVar( newValue, themePalette ) + hexToVar( newValue, themePalette ) ?? '' ); setUserConfig( config ); };