Skip to content

Commit

Permalink
Merge pull request #12 from RHoKAustralia/fix-driver-map
Browse files Browse the repository at this point in the history
fix: handle case for no lnglats, defaults to map of sydney
  • Loading branch information
luketn authored Jul 18, 2018
2 parents f8403f9 + 960217a commit 92c903b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/driver/DriverMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ class DriverMap extends Component {
})
.reduce((acc, val) => acc.concat(val), []);

// If no lnglats, defaults to Sydney Area
if (lnglats.length === 0) {
lnglats.push([151.09901, -33.7049])
lnglats.push([151.058, -34.0331])
}

return getBoundsFromLngLatArray(lnglats);
}

Expand Down

0 comments on commit 92c903b

Please sign in to comment.