Deal with initially having no work items
This commit is contained in:
@@ -67,12 +67,12 @@ export const dotify = (s) => {
|
||||
}
|
||||
|
||||
export const regionContainingPoints = (points, inset) => {
|
||||
let minX,
|
||||
maxX,
|
||||
minY,
|
||||
maxY
|
||||
let minX, maxX, minY, maxY
|
||||
|
||||
if (!points) {
|
||||
return null
|
||||
}
|
||||
|
||||
// init first point
|
||||
;((point) => {
|
||||
minX = point.latitude
|
||||
maxX = point.latitude
|
||||
@@ -80,7 +80,6 @@ export const regionContainingPoints = (points, inset) => {
|
||||
maxY = point.longitude
|
||||
})(points[0])
|
||||
|
||||
// calculate rect
|
||||
points.map((point) => {
|
||||
minX = Math.min(minX, point.latitude)
|
||||
maxX = Math.max(maxX, point.latitude)
|
||||
|
||||
Reference in New Issue
Block a user