From 334cb9f93b660a204b826eb6d1b3f0244793dc84 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 8 Feb 2013 18:01:45 -0500 Subject: [PATCH] Fix error, pos could be null --- js/id/behavior/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/behavior/select.js b/js/id/behavior/select.js index 9d30236bb..4d0bef2de 100644 --- a/js/id/behavior/select.js +++ b/js/id/behavior/select.js @@ -59,7 +59,7 @@ iD.behavior.Select = function(context) { function mouseup() { selection.on('mousemove.select', null); - if (d3.event.x === pos[0] && d3.event.y === pos[1] && + if (pos && d3.event.x === pos[0] && d3.event.y === pos[1] && !(d3.event.target.__data__ instanceof iD.Entity)) { context.enter(iD.modes.Browse(context)); }