Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/services/vegbilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ async function loadTile(cache, typename, tile) {
METER: metering,
FELTKODE: lane_code
} = properties;
const lane_number = parseInt(lane_code.match(/^[0-9]+/)[0], 10);
const lane_match = lane_code.match(/^[0-9]+/);
const lane_number = parseInt(lane_match ? lane_match[0] : '0', 10);
const direction = lane_number % 2 === 0 ? directionEnum.backward : directionEnum.forward;
const data = {
service: 'photo',
Expand Down