Skip to content

Commit

Permalink
πŸ› Add empty string fallback and fix typo #2453 (#2457)
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia authored Aug 16, 2024
1 parent 743d70c commit 1631acd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/pageComponents/topicPages/AddToCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const isUpcoming = (eventDate: Date): boolean => {
const createICS = (eventData: ICSProps): string | boolean => {
return ics.createEvent(eventData, (error: Error, value: string) => {
if (error) {
console.error('An error occured while generating ICS file.', error)
console.error('An error occurred while generating ICS file.', error)
return false
}

Expand Down Expand Up @@ -78,7 +78,7 @@ const AddToCalendar = ({ eventDate, title, location }: AddToCalendarProps) => {
end: padMonth(toUTCDateParts(end)), // ICS lib expects start & end to be an array
endInputType: 'utc',
title: title,
location: location,
location: location || '',
}

setFileData(createICS(eventData))
Expand Down

0 comments on commit 1631acd

Please sign in to comment.