Skip to content

Commit aff465f

Browse files
authored
Podcast Player: Simplify isUrl check (#15208)
1 parent 67bfb9e commit aff465f

File tree

1 file changed

+2
-6
lines changed
  • extensions/blocks/podcast-player

1 file changed

+2
-6
lines changed

extensions/blocks/podcast-player/edit.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,9 @@ const PodcastPlayerEdit = ( {
134134
// "http" to any entry before attempting validation.
135135
const prependedURL = prependHTTP( editedUrl );
136136

137-
const isValidURL = isURL( prependedURL );
138-
139-
if ( ! isValidURL ) {
137+
if ( ! isURL( prependedURL ) ) {
140138
createErrorNotice(
141-
! isValidURL
142-
? __( "Your podcast couldn't be embedded. Please double check your URL.", 'jetpack' )
143-
: ''
139+
__( "Your podcast couldn't be embedded. Please double check your URL.", 'jetpack' )
144140
);
145141
return;
146142
}

0 commit comments

Comments
 (0)