get_connecting_trains_p: handle uninitialized arr_countdown
This commit is contained in:
parent
dd151dc686
commit
3b9db4bfd4
1 changed files with 5 additions and 3 deletions
|
@ -79,9 +79,11 @@ sub get_connecting_trains_p {
|
||||||
my $can_check_in = not $arr_epoch || ( $arr_countdown // 1 ) < 0;
|
my $can_check_in = not $arr_epoch || ( $arr_countdown // 1 ) < 0;
|
||||||
|
|
||||||
$self->iris->get_departures_p(
|
$self->iris->get_departures_p(
|
||||||
station => $eva,
|
station => $eva,
|
||||||
lookbehind => 10,
|
lookbehind => 10,
|
||||||
lookahead => $can_check_in ? 40 : ( ${arr_countdown} / 60 + 40 ),
|
lookahead => $can_check_in
|
||||||
|
? 40
|
||||||
|
: ( ( ${arr_countdown} // 0 ) / 60 + 40 ),
|
||||||
with_related => 1
|
with_related => 1
|
||||||
)->then(
|
)->then(
|
||||||
sub {
|
sub {
|
||||||
|
|
Loading…
Reference in a new issue