From 2e61c15f2c09934a4dad35e9198af8ed1220eba0 Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Thu, 8 Dec 2022 23:46:04 +0530 Subject: [PATCH] fix: check input is not undefined (#5927) Signed-off-by: Udit Takkar Signed-off-by: Udit Takkar Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen --- apps/web/pages/event-types/[type]/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/pages/event-types/[type]/index.tsx b/apps/web/pages/event-types/[type]/index.tsx index 4cfb3b547f..c981cfccf9 100644 --- a/apps/web/pages/event-types/[type]/index.tsx +++ b/apps/web/pages/event-types/[type]/index.tsx @@ -283,7 +283,7 @@ const EventTypePage = (props: inferSSRProps) => { if (metadata?.multipleDuration.length < 1) { throw new Error(t("event_setup_multiple_duration_error")); } else { - if (!metadata?.multipleDuration?.includes(input.length)) { + if (input.length && !metadata?.multipleDuration?.includes(input.length)) { throw new Error(t("event_setup_multiple_duration_default_error")); } }