From b2cbca6ad7ccdb6db6e41833a749317e88f67fd3 Mon Sep 17 00:00:00 2001 From: SASAGAWA Kiyoshi Date: Sat, 10 Feb 2024 19:49:46 +0000 Subject: [PATCH] fix: set it 1 when the dtend and dtstart is the same. --- src/widgets/calendar/integrations/ical.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/calendar/integrations/ical.jsx b/src/widgets/calendar/integrations/ical.jsx index a7d7eccc..74093a14 100644 --- a/src/widgets/calendar/integrations/ical.jsx +++ b/src/widgets/calendar/integrations/ical.jsx @@ -57,7 +57,7 @@ export default function Integration({ config, params, setEvents, hideErrors, tim const dtend = ('dtend' in event) ? event.dtend : dtstart; const duration = dtend.value - dtstart.value; - const days = duration / (1000 * 60 * 60 * 24); + const days = duration === 0 ? 1 : duration / (1000 * 60 * 60 * 24); const eventDate = timezone ? DateTime.fromJSDate(date, { zone: timezone }) : DateTime.fromJSDate(date);