From 1dc8a7e479fa4092052ea81d32a1354a35742b01 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Thu, 17 Jun 2021 18:38:36 +1000 Subject: [PATCH] Prevent empty string values for longhand border radii --- .../src/components/border-radius-control/input-controls.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/border-radius-control/input-controls.js b/packages/block-editor/src/components/border-radius-control/input-controls.js index 74fb62db361925..45c5117a2a0440 100644 --- a/packages/block-editor/src/components/border-radius-control/input-controls.js +++ b/packages/block-editor/src/components/border-radius-control/input-controls.js @@ -14,7 +14,10 @@ export default function BoxInputControls( { ...props } ) { const createHandleOnChange = ( corner ) => ( next ) => { - onChange( { ...values, [ corner ]: next } ); + onChange( { + ...values, + [ corner ]: next ? next : undefined, + } ); }; // For backwards compatibility, handle possible flat string value.