Skip to content

Commit 4d4e8fd

Browse files
author
Camille Moussu
committed
fixup! [#352] added tests
1 parent d11e37c commit 4d4e8fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/features/Events/EventApi.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { resolveTimezoneId, convertEventDateTimeToISO } from "@/utils/timezone";
33
import { TIMEZONES } from "@/utils/timezone-data";
44
import ICAL from "ical.js";
55
import { CalDavItem } from "../Calendars/api/types";
6+
import { VCalComponent } from "../Calendars/types/CalendarData";
67
import { SearchEventsResponse } from "../Search/types/SearchEventsResponse";
78
import { CalendarEvent } from "./EventsTypes";
89
import {
@@ -365,15 +366,15 @@ export const updateSeries = async (
365366
// When only properties changed, keep override instances and update their metadata
366367

367368
// Helper function to get field values from props
368-
const getFieldValues = (props: any[], fieldName: string) => {
369+
const getFieldValues = (props: VCalComponent[], fieldName: string) => {
369370
return props.filter(([k]) => k.toLowerCase() === fieldName.toLowerCase());
370371
};
371372

372373
// Helper function to serialize for comparison
373-
const serialize = (values: any[]) => JSON.stringify(values);
374+
const serialize = (values: VCalComponent[]) => JSON.stringify(values);
374375

375376
// Detect which fields changed in the master
376-
const changedFields = new Map<string, any[]>();
377+
const changedFields = new Map<string, VCalComponent[]>();
377378
const oldMasterProps = oldMaster[1];
378379
const newMasterProps = updatedMaster[1];
379380

0 commit comments

Comments
 (0)