Skip to content

Commit

Permalink
Add default for destructured context in image edit
Browse files Browse the repository at this point in the history
This is necessary for unit tests, because they instantiate the block's
edit component directly, and so the default context is not provided.
  • Loading branch information
mkevins committed Jun 1, 2021
1 parent 31cf53d commit 1999569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export class ImageEdit extends Component {
image,
clientId,
imageDefaultSize,
context: { isGrouped = false, imageCrop = false },
context: { isGrouped = false, imageCrop = false } = {},
featuredImageId,
wasBlockJustInserted,
} = this.props;
Expand Down

0 comments on commit 1999569

Please sign in to comment.