From 9400abdbf46ba294d9ec7568f8369df3c32bcb3a Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 2 Jul 2020 09:04:26 +0300 Subject: [PATCH] Revert "reset options if freq changes" This reverts commit f64169385eafad053cfa7e84a6ffa7624a88956d. --- src/widgets/RRule.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/widgets/RRule.tsx b/src/widgets/RRule.tsx index 066a6cf..acdc41e 100644 --- a/src/widgets/RRule.tsx +++ b/src/widgets/RRule.tsx @@ -120,12 +120,7 @@ interface PropsType { export default function RRule(props: PropsType) { const options = props.rrule; function updateRule(newOptions: Partial): void { - let updatedOptions: RRuleOptions; - if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) { - updatedOptions = { freq: newOptions.freq }; - } else { - updatedOptions = { ...options, ...newOptions } ; - } + const updatedOptions: RRuleOptions = { ...options, ...newOptions }; for (const key of Object.keys(updatedOptions)) { const value = updatedOptions[key];