From 98b2221a333da880d8ab47faad555eea77f60f60 Mon Sep 17 00:00:00 2001 From: Novak Zaballa Date: Wed, 5 Jun 2024 17:02:22 -0400 Subject: [PATCH] return schedule only when is true --- frontend/web/components/saveFeatureWithValidation.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/web/components/saveFeatureWithValidation.ts b/frontend/web/components/saveFeatureWithValidation.ts index 4bea1342fbff..816b7791269a 100644 --- a/frontend/web/components/saveFeatureWithValidation.ts +++ b/frontend/web/components/saveFeatureWithValidation.ts @@ -9,7 +9,11 @@ export const saveFeatureWithValidation = (cb: (schedule?: boolean) => void) => { yesText: 'Save', }) } else { - cb(schedule) + if (schedule) { + cb(schedule) + } else { + cb() + } } } }