From 114aaae772560cdaf72004dee105c8ff5d1ca745 Mon Sep 17 00:00:00 2001 From: Paul Handorff Date: Thu, 19 Mar 2020 20:31:12 -0400 Subject: [PATCH] fix: select arrival/departure times correctly --- lib/screens/predictions/parser.ex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/screens/predictions/parser.ex b/lib/screens/predictions/parser.ex index 3ec1abf3a..61fda9449 100644 --- a/lib/screens/predictions/parser.ex +++ b/lib/screens/predictions/parser.ex @@ -47,9 +47,10 @@ defmodule Screens.Predictions.Parser do departure_time = parse_time(departure_time_string) time = - case arrival_time do - nil -> departure_time - t -> t + case {arrival_time, departure_time} do + {nil, t} -> t + {_, nil} -> nil + {t, _} -> t end %{