Skip to content

Commit

Permalink
Fix JS error on featured image import
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Merland committed Sep 11, 2017
1 parent 5bb6925 commit 5bfbfc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/admin/wpmoly-media.js
Expand Up @@ -321,7 +321,9 @@ var wpmoly_images, wpmoly_posters;
success: function( response ) {
if ( response ) {
wp.media.featuredImage.set( response.data );
$( '#wpmoly-movie-preview-poster > img' ).prop( 'src', image.attributes.url );
if ( undefined != image.attributes ) {
$( '#wpmoly-movie-preview-poster > img' ).prop( 'src', image.attributes.url );
}
}
},
complete: function() {
Expand Down

0 comments on commit 5bfbfc8

Please sign in to comment.