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

correctly initialize ice_type_map hash

This ensures proper operation when the zugbildungsplan is empty, e.g. because
the underlying source file has become invalid.

Closes #14
parent e2753e2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ sub startup {
			if ( -r 'share/zugbildungsplan.json' ) {
				my $ice_type_map = JSON->new->utf8->decode(
					scalar read_file('share/zugbildungsplan.json') );
				my $ret;
				my $ret = {};
				while ( my ( $k, $v ) = each %{ $ice_type_map->{train} } ) {
					if ( $v->{type} ) {
						$ret->{$k} = [