From cb964e9bcd0c44637f590b98dc3b4668c8f7ed2b Mon Sep 17 00:00:00 2001 From: Mikhaela Tapia Date: Tue, 15 Jul 2025 19:58:58 +0800 Subject: [PATCH] check if width is not empty --- src/block-components/image/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block-components/image/edit.js b/src/block-components/image/edit.js index 2277968427..635b34db6e 100644 --- a/src/block-components/image/edit.js +++ b/src/block-components/image/edit.js @@ -175,7 +175,7 @@ const Controls = props => { newAttributes.imageWidth = '' newAttributes.imageWidthUnit = '%' // We need the width of the image block to compare - if ( width < imageBlockWidth ) { + if ( width && width < imageBlockWidth ) { newAttributes.imageWidth = width newAttributes.imageWidthUnit = 'px' }