diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2020-01-27 20:22:46 +0100 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-27 20:25:02 +0100 | 
| commit | 47171500b7209d1f14078c13e37664d2de29a1cc (patch) | |
| tree | 72c262854fb54b2e71cc678ad25b7ff93e23e441 /lib | |
| parent | 556bafffcfa205057a4ab75c027788a67ea36f3f (diff) | |
fix bugs related to users without past journeys1.13.9
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/Travelynx.pm | 20 | 
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 7a72cc6..b7d9368 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -3208,8 +3208,12 @@ sub startup {  					uic           => $status->{dep_eva},  					longitude     => undef,  					latitude      => undef, -					scheduledTime => $status->{sched_departure}->epoch || undef, -					realTime      => $status->{real_departure}->epoch || undef, +					scheduledTime => $status->{sched_departure} +					? $status->{sched_departure}->epoch +					: undef, +					realTime => $status->{real_departure} +					? $status->{real_departure}->epoch +					: undef,  				},  				toStation => {  					ds100         => $status->{arr_ds100}, @@ -3217,8 +3221,12 @@ sub startup {  					uic           => $status->{arr_eva},  					longitude     => undef,  					latitude      => undef, -					scheduledTime => $status->{sched_arrival}->epoch || undef, -					realTime      => $status->{real_arrival}->epoch || undef, +					scheduledTime => $status->{sched_arrival} +					? $status->{sched_arrival}->epoch +					: undef, +					realTime => $status->{real_arrival} +					? $status->{real_arrival}->epoch +					: undef,  				},  				train => {  					type => $status->{train_type}, @@ -3226,7 +3234,9 @@ sub startup {  					no   => $status->{train_no},  					id   => $status->{train_id},  				}, -				actionTime        => $status->{timestamp}->epoch, +				actionTime => $status->{timestamp} +				? $status->{timestamp}->epoch +				: undef,  				intermediateStops => [],  			};  | 
