Guard code around geoPointInPolygon

(closes #3876)
This commit is contained in:
Bryan Housel
2017-03-04 00:24:36 -05:00
parent 38accf58a0
commit 814a2eb887
+3 -1
View File
@@ -158,8 +158,10 @@ export function modeSelect(context, selectedIDs) {
var point = context.mouse(),
viewport = geoExtent(context.projection.clipExtent()).polygon();
if (geoPointInPolygon(point, viewport)) {
if (point && geoPointInPolygon(point, viewport)) {
editMenu.center(point);
} else {
suppressMenu = true;
}
}
}