Skip to content

Commit

Permalink
Mobile - BlockListItem - Don't spread the parentWith value to be pass…
Browse files Browse the repository at this point in the history
… down through restProps
  • Loading branch information
Gerardo committed Apr 13, 2023
1 parent b81414c commit 5d44504
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,17 @@ function BlockListItemContent( {
* @return {WPComponent|null} The rendered block list item or null if the block width is not provided.
*/
function BlockListItem( props ) {
const {
isGridItem,
numOfColumns,
parentWidth,
tileCount,
tileIndex,
...restProps
} = props;
const { isGridItem, numOfColumns, tileCount, tileIndex, ...restProps } =
props;

if ( ! props.blockWidth ) {
if ( ! props?.blockWidth ) {
return null;
}

if ( isGridItem ) {
return (
<Grid
maxWidth={ parentWidth }
maxWidth={ props?.parentWidth }
numOfColumns={ numOfColumns }
tileCount={ tileCount }
index={ tileIndex }
Expand Down

0 comments on commit 5d44504

Please sign in to comment.