From 9108d2cb0350fa974bdbe01e07649fa1e2731983 Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Thu, 29 Sep 2022 17:40:35 +0200 Subject: [PATCH] Fix display issue when departures is an empty list --- sncf/display.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sncf/display.ss b/sncf/display.ss index 1f58935..e6eedeb 100644 --- a/sncf/display.ss +++ b/sncf/display.ss @@ -46,10 +46,10 @@ (def (display-all departures disruptions station-name (datetime #f) style: (style 'unicode)) (let/cc return - (unless departures + (when (or (not departures) (null? departures)) (displayln (format "Aucun départ prévu de ~a~a" 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)) (display (if (eq? style 'markdown)