Skip to content

Commit

Permalink
We don't need this wild check now that #60265 is merged
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Mar 28, 2024
1 parent 1aedfd3 commit 4bd596e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ export const backgroundPositionToCoords = ( value ) => {
};

function InspectorImagePreview( { label, filename, url: imgUrl } ) {
let imgLabel = label || getFilename( imgUrl );
// getFilename returns 'undefined' as a string.
imgLabel =
!! imgLabel && imgLabel !== 'undefined' ? imgLabel : __( 'Add image' );
const imgLabel = label || getFilename( imgUrl ) || __( 'Add image' );

return (
<ItemGroup as="span">
Expand Down

0 comments on commit 4bd596e

Please sign in to comment.