From a4d7b20027f7fac812f7f09e110cb0b1b9de778f Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Tue, 2 Apr 2013 16:23:40 -0400 Subject: [PATCH] Don't try to select non-multipolygon relations --- js/id/modes/select.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/id/modes/select.js b/js/id/modes/select.js index de5d4ffe2..c1bdfa527 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -4,6 +4,13 @@ iD.modes.Select = function(context, selection, initial) { button: 'browse' }; + // Selecting non-multipolygon relations is not supported + selection = selection.filter(function(d) { + return context.entity(d).geometry(context.graph()) !== 'relation'; + }); + + if (!selection.length) return iD.modes.Browse(context); + var inspector = iD.ui.Inspector(context, singular()), keybinding = d3.keybinding('select'), timeout = null,