From 5db116e1f5fc75365650677e51f1b14677014d17 Mon Sep 17 00:00:00 2001 From: Grigory Vodyanov Date: Tue, 16 Apr 2024 19:55:19 +0200 Subject: [PATCH] fix: conform to latest ical.js version Signed-off-by: Grigory Vodyanov --- src/convert.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/convert.js b/src/convert.js index 21ed77f..9930b4a 100644 --- a/src/convert.js +++ b/src/convert.js @@ -1,5 +1,5 @@ import { getZoneString } from 'icalzone' -import { parse as parseIcal, Component } from 'ical.js' +import ICAL from 'ical.js' import { v4 as uuidv4 } from 'uuid' import logger from './utils/logger.js' @@ -23,9 +23,9 @@ export function getEmptySlots() { * @param vavailability */ export function vavailabilityToSlots(vavailability) { - const parsedIcal = parseIcal(vavailability) + const parsedIcal = ICAL.parse(vavailability) - const vcalendarComp = new Component(parsedIcal) + const vcalendarComp = new ICAL.Component(parsedIcal) const vavailabilityComp = vcalendarComp.getFirstSubcomponent('vavailability') let timezoneId