Skip to content

Commit

Permalink
don;t require item description
Browse files Browse the repository at this point in the history
  • Loading branch information
jdshaw committed Jun 21, 2022
1 parent 006d961 commit a11b5b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asset/js/random-items-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class RandomItemsBlock {
const imageMediaUrl = typeof(data['o:media']) != 'undefined' ? data['o:media'][0]['@id'] : null
const descriptionMediaUrl = typeof(data['o:media']) != 'undefined' && typeof(data['o:media'][1]) != 'undefined' ? data['o:media'][1]['@id'] : null

if (itemImageUrl != null && itemTitle != null && itemDescription != null) {
if (itemImageUrl != null && itemTitle != null) {
this.renderApiData(itemId, itemImageUrl, itemTitle, itemDescription, imageMediaUrl, descriptionMediaUrl, targetEl, btnEl);
}
else {
Expand Down Expand Up @@ -113,7 +113,7 @@ class RandomItemsBlock {
if (descriptionHtml != null) {
html += descriptionHtml;
}
else {
else if (itemDescription != null) {
html += '<p>' + itemDescription + '</p>';
}

Expand Down

0 comments on commit a11b5b2

Please sign in to comment.