diff --git a/modules/behavior/select.js b/modules/behavior/select.js index 59273d144..a24412778 100644 --- a/modules/behavior/select.js +++ b/modules/behavior/select.js @@ -74,8 +74,8 @@ export function behaviorSelect(context) { mode = context.mode(); - if (datum.type === 'midpoint') { - // clicked midpoint, do nothing.. + if (!datum || datum.type === 'midpoint') { + // do nothing.. } else if (!(datum instanceof osmEntity)) { // clicked nothing..