fix: timetable dates cannot be removed

This commit is contained in:
Thea Schöbl
2022-05-03 11:06:06 +00:00
committed by Rainer Killinger
parent 29585faff6
commit 9242438132
7 changed files with 134 additions and 19 deletions

View File

@@ -21,7 +21,7 @@ export function groupBy<T>(
group: (item: T) => string | undefined,
): Record<string, T[]> {
return collection.reduce((accumulator: Record<string, T[]>, item) => {
const key = group(item) || '';
const key = group(item) ?? '';
accumulator[key] = accumulator[key] ?? [];
accumulator[key].push(item);
return accumulator;