fix: lint

This commit is contained in:
SASAGAWA Kiyoshi 2024-02-10 19:52:40 +00:00
parent b2cbca6ad7
commit 8e6b52f260

View File

@ -54,7 +54,7 @@ export default function Integration({ config, params, setEvents, hideErrors, tim
const eventToAdd = (date, i, type) => {
// When the 'dtend' is not defined (one-day all-day event), 'dtend' should be the same as 'dtstart'.
const { dtstart } = event;
const dtend = ('dtend' in event) ? event.dtend : dtstart;
const dtend = 'dtend' in event ? event.dtend : dtstart;
const duration = dtend.value - dtstart.value;
const days = duration === 0 ? 1 : duration / (1000 * 60 * 60 * 24);