Skip to content

Commit

Permalink
Fixes wrong state comparison (#13987)
Browse files Browse the repository at this point in the history
Upload media progress bar is missing while media is uploading new
  • Loading branch information
marecar3 authored Feb 20, 2019
1 parent ece3caf commit d2e2a18
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 @@ -124,7 +124,7 @@ class ImageEdit extends React.Component {
updateMediaProgress( payload ) {
const { setAttributes } = this.props;
this.setState( { progress: payload.progress, isUploadInProgress: true, isUploadFailed: false } );
if ( payload.mediaUrl !== undefined ) {
if ( payload.mediaUrl ) {
setAttributes( { url: payload.mediaUrl } );
}
}
Expand Down

0 comments on commit d2e2a18

Please sign in to comment.