Skip to content

Commit

Permalink
Only add flex-basis if width contains a number (#35831)
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath authored Oct 26, 2021
1 parent 77a2e0e commit 7f2978a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/column/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function save( { attributes } ) {

let style;

if ( width ) {
if ( width && /\d/.test( width ) ) {
// Numbers are handled for backward compatibility as they can be still provided with templates.
let flexBasis = Number.isFinite( width ) ? width + '%' : width;
// In some cases we need to round the width to a shorter float.
Expand Down

0 comments on commit 7f2978a

Please sign in to comment.