Skip to content

Commit

Permalink
feat: event link will be disabled when no URL is present
Browse files Browse the repository at this point in the history
  • Loading branch information
marksie1988 committed Sep 25, 2023
1 parent e0895e1 commit 286b8a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/event.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default class EventClass {
* @return {String}
*/
get htmlLink() {
return this.rawEvent.htmlLink || '';
return this.rawEvent.htmlLink || undefined;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/lib/eventMode.html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<div style="text-decoration: ${textDecoration};color: ${titleColor}">
<div class="event-title ${dayClassEventRunning}">${getEventIcon(config, event)} ${title} ${getMultiDayEventParts(config, event)} </div>
Expand Down

0 comments on commit 286b8a1

Please sign in to comment.