Add check for possible missing activeEntity in drag_node

This commit is contained in:
Quincy Morgan
2019-05-08 12:17:36 -04:00
parent bafc0da99c
commit 760134c2aa

View File

@@ -91,6 +91,7 @@ export function modeDragNode(context) {
function shouldSnapToNode(target) {
if (!_activeEntity) return false;
return _activeEntity.geometry(context.graph()) !== 'vertex' ||
(target.geometry(context.graph()) === 'vertex' || context.presets().allowsVertex(target, context.graph()));
}