Unverified Commit c39c7869 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

EFA: results_dm: Handle station boards with just a single departure

parent ab564267
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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(