Skip to content

Commit

Permalink
Avoid destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroalonso committed Jan 27, 2020
1 parent 360ef2b commit e113310
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export class ImageEdit extends React.Component {

const imageContainerHeight = Dimensions.get( 'window' ).width / IMAGE_ASPECT_RATIO;

const editImageComponent = ( openMediaOptions, mediaOptions ) => (
const editImageComponent = ( { openMediaOptions, mediaOptions } ) => (
<TouchableWithoutFeedback
onPress={ openMediaOptions }>
<View style={ styles.edit }>
Expand Down Expand Up @@ -476,9 +476,7 @@ export class ImageEdit extends React.Component {
onSelect={ this.onSelectMediaUploadOption }
source={ { uri: url } }
openReplaceMediaOptions={ openMediaOptions }
render={ ( { open, mediaOptions } ) => {
return editImageComponent( open, mediaOptions );
} }
render={ editImageComponent }
/>
}
</ImageBackground>
Expand Down

0 comments on commit e113310

Please sign in to comment.