Fix display issue when departures is an empty list

This commit is contained in:
Dimitri Lozeve 2022-09-29 17:40:35 +02:00
parent 81139dc91a
commit 9108d2cb03

View file

@ -46,10 +46,10 @@
(def (display-all departures disruptions station-name (datetime #f) style: (style 'unicode)) (def (display-all departures disruptions station-name (datetime #f) style: (style 'unicode))
(let/cc return (let/cc return
(unless departures (when (or (not departures) (null? departures))
(displayln (format "Aucun départ prévu de ~a~a" (displayln (format "Aucun départ prévu de ~a~a"
station-name station-name
(if datetime (string-append " le " (date->string datetime "~d ~b ~Y"))))) (if datetime (string-append " le " (date->string datetime "~d ~b ~Y")) "")))
(return)) (return))
(display (display
(if (eq? style 'markdown) (if (eq? style 'markdown)