Skip to content

Commit

Permalink
Corrected to check if item exists
Browse files Browse the repository at this point in the history
  • Loading branch information
davenichols-DHLS committed Jul 17, 2024
1 parent 233876f commit b75e2e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/event-summary/event-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default async function decorate(block) {
{ class: 'event-date' },
`${date} ${eventTime}`,
) : p({ class: 'event-date' }, date));
const eventSubtitle = h1({ class: 'event-subtitle' }, eventTitle.textContent ? eventTitle : title);
const eventSubtitle = h1({ class: 'event-subtitle' }, eventTitle || title);
const keywordList = ul(
{ class: 'keyword-list' },
li({ class: 'item type' }, type),
Expand All @@ -61,7 +61,7 @@ export default async function decorate(block) {

// Append elements to block
block.appendChild(imageContainer);
block.appendChild(div({ class: 'event-details' }, eventDate, eventSubtitle, div({ class: 'event-keywords' }, keywordList), div({ class: 'event-description' }, eventSummary.textContent ? eventSummary : description, registerButtonContainer, talkButtonContainer)));
block.appendChild(div({ class: 'event-details' }, eventDate, eventSubtitle, div({ class: 'event-keywords' }, keywordList), div({ class: 'event-description' }, eventSummary || description, registerButtonContainer, talkButtonContainer)));

// Add event listener to the 'Register Today' button
registerButtonLink.addEventListener('click', (event) => {
Expand Down

0 comments on commit b75e2e6

Please sign in to comment.