From 028c8f295d8148dd7f4e3447c48fd28710733ef0 Mon Sep 17 00:00:00 2001 From: Gertjan van Oosten Date: Mon, 25 Oct 2021 13:29:41 +0200 Subject: [PATCH] NCI-Agency/anet#3896: Fix calendar aggregation error if there are no date fields with values yet --- client/src/components/aggregations/CalendarWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/aggregations/CalendarWidget.js b/client/src/components/aggregations/CalendarWidget.js index acdd46406e..b198b70d9a 100644 --- a/client/src/components/aggregations/CalendarWidget.js +++ b/client/src/components/aggregations/CalendarWidget.js @@ -21,7 +21,7 @@ const CalendarWidget = ({ hasPrevNext }) => { const calendarComponentRef = useRef(null) - const events = GET_CALENDAR_EVENTS_FROM[valueType](values) + const events = GET_CALENDAR_EVENTS_FROM[valueType]?.(values) const history = useHistory() if (_isEmpty(events)) { return whenUnspecified