Skip to content

Commit

Permalink
removes url check as it will never be false when this function is used
Browse files Browse the repository at this point in the history
  • Loading branch information
antpb committed Nov 9, 2018
1 parent 918e0e6 commit d93e67e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/block-library/src/image/edit.js
Expand Up @@ -248,13 +248,8 @@ class ImageEdit extends Component {
}

getFilename( url ) {
if ( url ) {
const fileName = url.match( /.*\/(.+?)(?:\?.*)?$/ );
if ( fileName ) {
return fileName[ 1 ];
}
}
return '';
const fileName = url.match( /.*\/(.+?)(?:\?.*)?$/ );
return fileName[ 1 ];
}

getImageSizes() {
Expand Down

0 comments on commit d93e67e

Please sign in to comment.