Prevent crash when missing datum

(This can happen if the user mouseups on a tooltip, e.g. in walkthrough)
This commit is contained in:
Bryan Housel
2017-03-22 10:27:15 -04:00
parent a015b4442b
commit 681ee5a89a

View File

@@ -74,8 +74,8 @@ export function behaviorSelect(context) {
mode = context.mode(); mode = context.mode();
if (datum.type === 'midpoint') { if (!datum || datum.type === 'midpoint') {
// clicked midpoint, do nothing.. // do nothing..
} else if (!(datum instanceof osmEntity)) { } else if (!(datum instanceof osmEntity)) {
// clicked nothing.. // clicked nothing..