check for sizes

This commit is contained in:
Mike Jolley 2015-09-07 11:13:00 +01:00
parent 779e23dfe3
commit 4bda0f2387
2 changed files with 2 additions and 2 deletions

View File

@ -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