From 286b8a1ab815094b3dae369f4cf40410c0e60ce8 Mon Sep 17 00:00:00 2001 From: marksie1988 Date: Mon, 25 Sep 2023 11:37:07 +0000 Subject: [PATCH] feat: event link will be disabled when no URL is present --- src/lib/event.class.ts | 2 +- src/lib/eventMode.html.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/event.class.ts b/src/lib/event.class.ts index f221ca60..67ccfabe 100644 --- a/src/lib/event.class.ts +++ b/src/lib/event.class.ts @@ -184,7 +184,7 @@ export default class EventClass { * @return {String} */ get htmlLink() { - return this.rawEvent.htmlLink || ''; + return this.rawEvent.htmlLink || undefined; } /** diff --git a/src/lib/eventMode.html.ts b/src/lib/eventMode.html.ts index 05c9f1a0..4e04be40 100644 --- a/src/lib/eventMode.html.ts +++ b/src/lib/eventMode.html.ts @@ -37,8 +37,7 @@ export function getTitleHTML(config: atomicCardConfig, event: EventClass) { if (!isHtml(event.title) && config.titleLength && event.title.length > config.titleLength) { title = event.title.slice(0, config.titleLength); } - - if (config.disableEventLink || event.htmlLink == 'undefined' || event.htmlLink === null) { + if (config.disableEventLink || event.htmlLink === undefined || event.htmlLink === null) { return html`
${getEventIcon(config, event)} ${title} ${getMultiDayEventParts(config, event)}