summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/IRIS/Stations.pm.PL8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Stations.pm.PL b/lib/Travel/Status/DE/IRIS/Stations.pm.PL
index c21c94e..c2681ab 100644
--- a/lib/Travel/Status/DE/IRIS/Stations.pm.PL
+++ b/lib/Travel/Status/DE/IRIS/Stations.pm.PL
@@ -80,6 +80,10 @@ sub normalize {
sub get_station {
my ($name) = @_;
+ if (not $name) {
+ return;
+ }
+
my $ds100_match = firstval { $name eq $_->[0] } @stations;
if ($ds100_match) {
@@ -125,6 +129,10 @@ sub get_station_by_location {
sub get_station_by_name {
my ($name) = @_;
+ if (not $name) {
+ return;
+ }
+
my $nname = lc($name);
my $actual_match = firstval { $nname eq lc( $_->[1] ) } @stations;