Skip to content

Commit

Permalink
Fix reading prop from old context
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Jul 12, 2024
1 parent 3c3c3f2 commit 64ad89e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/image/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ const { state, actions, callbacks } = store(
// In the case of an image with object-fit: contain, the size of the
// <img> element can be larger than the image itself, so it needs to
// calculate where to place the button.
if ( ctx.scaleAttr === 'contain' ) {
if ( state.metadata[ imageId ].scaleAttr === 'contain' ) {
// Natural ratio of the image.
const naturalRatio = naturalWidth / naturalHeight;
// Offset ratio of the image.
Expand Down

0 comments on commit 64ad89e

Please sign in to comment.