diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2021-07-02 21:08:00 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-02 21:08:00 +0200 | 
| commit | 9d0af20c38ecf47304b494e12fb2d7c96aa0cce9 (patch) | |
| tree | 287ad062e5f7aa1a4f6ba7ff3c7c16b7af3aa765 /lib/DBInfoscreen | |
| parent | 257a4ec39bbf6c9fadce097b854c16969c953a35 (diff) | |
only show ambiguous page if the input -really- was ambiguous
Diffstat (limited to 'lib/DBInfoscreen')
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 55dcd0b..0bf1895 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -34,8 +34,12 @@ sub handle_no_results {  	my @candidates = map { [ $_->[1], $_->[0] ] }  	  Travel::Status::DE::IRIS::Stations::get_station($station); -	if ( @candidates > 1 -		or ( @candidates == 1 and $candidates[0][1] ne $station ) ) +	if ( +		@candidates > 1 +		or (    @candidates == 1 +			and $candidates[0][0] ne $station +			and $candidates[0][1] ne $station ) +	  )  	{  		$self->render(  			'landingpage', | 
