Skip to content

Commit

Permalink
nil values
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Oct 30, 2024
1 parent 2b4ca19 commit 6a5511f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions import/openrailwaymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ function dominant_speed_label(preferred_direction, speed, forward_speed, backwar
end

if preferred_direction == 'forward' then
return speed_int(forward_speed), forward_speed .. ' (' .. (backward_speed or '-') .. ')'
return speed_int(forward_speed), (forward_speed or '-') .. ' (' .. (backward_speed or '-') .. ')'
elseif preferred_direction == 'backward' then
return speed_int(backward_speed), backward_speed .. ' (' .. (forward_speed or '-') .. ')'
return speed_int(backward_speed), (backward_speed or '-') .. ' (' .. (forward_speed or '-') .. ')'
elseif preferred_direction == 'both' or (not preferred_direction) then
return speed_int(forward_speed), (forward_speed or '-') .. ' / ' .. (backward_speed or '-')
else
Expand Down

0 comments on commit 6a5511f

Please sign in to comment.