summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-06-21 11:35:38 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-06-21 11:35:38 +0200
commitc39c78690e461be89a5ab23715d14ec84615e124 (patch)
tree381c7f6b97faf903e9a49ace8b04df143a0032b6
parentab5642672dea8c8763608911f28c8d92113b3be2 (diff)
EFA: results_dm: Handle station boards with just a single departureHEADmain
-rw-r--r--lib/Travel/Status/DE/EFA.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index 943a7a5..be08b9a 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -628,6 +628,11 @@ sub results_dm {
my ($self) = @_;
my $json = $self->{response};
+ # Oh EFA, you so silly
+ if ( $json->{departureList} and ref( $json->{departureList} ) eq 'HASH' ) {
+ $json->{departureList} = [ $json->{departureList}{departure} ];
+ }
+
my @results;
for my $departure ( @{ $json->{departureList} // [] } ) {
push(