diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-09-26 21:51:29 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-09-26 21:51:29 +0200 |
commit | beb609fa8b97a3a071f76448203daa880d34d204 (patch) | |
tree | e85a074d8267b0db918b8704c91bab7d8aaa91b6 /lib/Travel/Status/DE/EFA.pm | |
parent | 128e6283f38db5393beafd5e069a4411b41a93c4 (diff) |
itdOdvAssignedStops can be a hashref rather than a listref...
Diffstat (limited to 'lib/Travel/Status/DE/EFA.pm')
-rw-r--r-- | lib/Travel/Status/DE/EFA.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm index d2a9174..2c08575 100644 --- a/lib/Travel/Status/DE/EFA.pm +++ b/lib/Travel/Status/DE/EFA.pm @@ -376,8 +376,14 @@ sub stops { return @{ $self->{stops} }; } + my $stops = $self->{response}{dm}{itdOdvAssignedStops} // []; + + if ( ref($stops) eq 'HASH' ) { + $stops = [$stops]; + } + my @stops; - for my $stop ( @{ $self->{response}{dm}{itdOdvAssignedStops} // [] } ) { + for my $stop ( @{$stops} ) { push( @stops, Travel::Status::DE::EFA::Stop->new( |