diff options
Diffstat (limited to 'lib/Travel')
-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( |