diff options
Diffstat (limited to 'module/vcomponent')
-rw-r--r-- | module/vcomponent/recurrence/generate.scm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm index 0ad30c84..081c250f 100644 --- a/module/vcomponent/recurrence/generate.scm +++ b/module/vcomponent/recurrence/generate.scm @@ -90,16 +90,15 @@ ((e _) (let ((expected-start (attr e 'DTSTART))) ;; If we have alternatives, check them - (cond [(attr e 'X-HNH-ALTERNATIVES) - (lambda (alternatives) - ;; A recurrence id matching the expected time means that - ;; we have an actuall alternative/exception, use that - ;; instead of the regular event. - (find (lambda (alt) (time=? expected-start (attr alt 'RECURRENCE-ID))) - alternatives)) - => identity] - ;; If we did't have an exception just return the regular event. - [else e])))) + (or (and=> (attr e 'X-HNH-ALTERNATIVES) + (lambda (alternatives) + ;; A recurrence id matching the expected time means that + ;; we have an actuall alternative/exception, use that + ;; instead of the regular event. + (find (lambda (alt) (time=? expected-start (attr alt 'RECURRENCE-ID))) + alternatives))) + ;; If we did't have an exception just return the regular event. + e)))) ;; Event x Rule → Bool (continue?) (match-lambda |