Skip to content

Commit cb964e9

Browse files
committed
check if width is not empty
1 parent f3fc365 commit cb964e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/block-components/image/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const Controls = props => {
175175
newAttributes.imageWidth = ''
176176
newAttributes.imageWidthUnit = '%'
177177
// We need the width of the image block to compare
178-
if ( width < imageBlockWidth ) {
178+
if ( width && width < imageBlockWidth ) {
179179
newAttributes.imageWidth = width
180180
newAttributes.imageWidthUnit = 'px'
181181
}

0 commit comments

Comments
 (0)