Skip to content

Commit

Permalink
[RNMobile] Fix image preview with small image size selected (#19247)
Browse files Browse the repository at this point in the history
* Send original url to requestImageFullScreenPreview

* Fix lint issues

* Simplify image object undefine check
  • Loading branch information
etoledom committed Jan 20, 2020
1 parent 49cd963 commit ee6cc56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ export class ImageEdit extends React.Component {
}

onImagePressed() {
const { attributes } = this.props;
const { attributes, image } = this.props;

if ( this.state.isUploadInProgress ) {
requestImageUploadCancelDialog( attributes.id );
} else if ( attributes.id && ! isURL( attributes.url ) ) {
requestImageFailedRetryDialog( attributes.id );
} else if ( ! this.state.isCaptionSelected ) {
requestImageFullscreenPreview( attributes.url );
requestImageFullscreenPreview( attributes.url, image && image.source_url );
}

this.setState( {
Expand Down

0 comments on commit ee6cc56

Please sign in to comment.