diff options
Diffstat (limited to 'modern/src/settings')
-rw-r--r-- | modern/src/settings/CalendarPage.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/settings/CalendarPage.js b/modern/src/settings/CalendarPage.js index 5ceb72d0..2868d3d5 100644 --- a/modern/src/settings/CalendarPage.js +++ b/modern/src/settings/CalendarPage.js @@ -22,8 +22,11 @@ const formatCalendarTime = (time) => { }; const parseRule = (rule) => { + if (rule.endsWith('COUNT=1')) { + return { frequency: 'ONCE' }; + } const fragments = rule.split(';'); - const frequency = fragments[0].includes('FREQ') ? fragments[0].substring(11) : 'ONCE'; + const frequency = fragments[0].substring(11); const by = fragments.length > 1 ? fragments[1].split('=')[1].split(',') : null; return { frequency, by }; }; |