diff --git a/lib/Travel/Status/DE/HAFAS/Services.pm.PL b/lib/Travel/Status/DE/HAFAS/Services.pm.PL index 97eabef20fff103ed734d24624d4a53c7a6aac97..638bd538713b2d5a8ef316e2082d84241addf6f2 100644 --- a/lib/Travel/Status/DE/HAFAS/Services.pm.PL +++ b/lib/Travel/Status/DE/HAFAS/Services.pm.PL @@ -46,7 +46,12 @@ sub load_instance { for ( 1 .. $skipped ) { push( @{ $ret{productbits} }, [ "_", undef ] ); } - push( @{ $ret{productbits} }, [ $p->{id}, $p->{name} ] ); + if ( $p->{name} ) { + push( @{ $ret{productbits} }, [ $p->{id}, $p->{name} ] ); + } + else { + push( @{ $ret{productbits} }, $p->{id} ); + } } else { $skipped += 1;