From e2b732f2120803054f69842026ad115030654fbf Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 14 Jan 2020 21:39:19 +0200 Subject: [PATCH] RRule: remove redundant checks. --- src/widgets/RRule.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/widgets/RRule.tsx b/src/widgets/RRule.tsx index 731a5fa..1200561 100644 --- a/src/widgets/RRule.tsx +++ b/src/widgets/RRule.tsx @@ -207,9 +207,7 @@ export default function RRule(props: PropsType) { style={styles.multiSelect} onChange={(event: React.ChangeEvent<{ value: unknown }>) => { const value = event.target.value as string[]; - if (value) { - updateRule({ byday: value }); - } + updateRule({ byday: value }); }}> {menuItemsWeekDays} @@ -245,9 +243,7 @@ export default function RRule(props: PropsType) { multiple onChange={(event: React.ChangeEvent<{ value: unknown }>) => { const value = event.target.value as string[]; - if (value) { - updateRule({ bymonth: value.map((month) => Number(month)) }); - } + updateRule({ bymonth: value.map((month) => Number(month)) }); }}> {menuItemMonths}