diff options
-rwxr-xr-x | bin/db-zugbildung-to-json | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/db-zugbildung-to-json b/bin/db-zugbildung-to-json index 8ed2289..a09fe31 100755 --- a/bin/db-zugbildung-to-json +++ b/bin/db-zugbildung-to-json @@ -478,9 +478,9 @@ for my $train ( values %map ) { } } } - if ( exists $train->{cycle}{from} ) { - @{ $train->{cycle}{from} } = uniq @{ $train->{cycle}{from} }; - @{ $train->{cycle}{to} } = uniq @{ $train->{cycle}{to} }; + if ( exists $train->{cycle} ) { + @{ $train->{cycle}{from} } = uniq @{ $train->{cycle}{from} // [] }; + @{ $train->{cycle}{to} } = uniq @{ $train->{cycle}{to} // [] }; } } |