check for sizes
This commit is contained in:
parent
779e23dfe3
commit
4bda0f2387
|
@ -553,7 +553,7 @@ jQuery( function( $ ) {
|
|||
|
||||
if ( attachment.id ) {
|
||||
attachment_ids = attachment_ids ? attachment_ids + ',' + attachment.id : attachment.id;
|
||||
var attachment_image = attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
|
||||
var attachment_image = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
|
||||
|
||||
$product_images.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment_image + '" /><ul class="actions"><li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li></ul></li>' );
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue