Skip to content

Commit

Permalink
Try ignoring if layout doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Sep 10, 2024
1 parent 5e1e199 commit 9d8fa55
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ export function ImageEdit( {
// This won't work for them because the container width changes with the image.
// TODO: Find a way to observe the container width for flex and grid layouts.
const isMaxWidthContainerWidth =
!! parentLayout &&
parentLayout.type !== 'flex' &&
parentLayout.type !== 'grid';
! parentLayout ||
( parentLayout.type !== 'flex' && parentLayout.type !== 'grid' );
const [ maxWidthObserver, maxContentWidth ] = useMaxWidthObserver();

const altRef = useRef();
Expand Down

0 comments on commit 9d8fa55

Please sign in to comment.