Revert "when using multiple select must have and array with default values"

This reverts commit 7595be4df7.
master
Tom Hacohen 4 years ago
parent 7595be4df7
commit 2b8fa751b7

@ -122,7 +122,7 @@ export default function RRule(props: PropsType) {
function updateRule(newOptions: Partial<RRuleOptions>): void { function updateRule(newOptions: Partial<RRuleOptions>): void {
let updatedOptions: RRuleOptions; let updatedOptions: RRuleOptions;
if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) { if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) {
updatedOptions = { freq: newOptions.freq, byday: ['SU'], bymonth: [1] }; updatedOptions = { freq: newOptions.freq };
} else { } else {
updatedOptions = { ...options, ...newOptions } ; updatedOptions = { ...options, ...newOptions } ;
} }

Loading…
Cancel
Save