From 25223a3920603d5141bad84ca4d4cbc75109a30f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 6 Jun 2013 10:46:30 -0700 Subject: [PATCH] Fix infinite recursion in geocoder (fixes #1580) --- js/id/ui/geocoder.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index 74385ac21..5227c4776 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -82,15 +82,9 @@ iD.ui.Geocoder = function(context) { } else { context.map().on('drawn.geocoder', function() { if (!context.hasEntity(id)) return; + context.map().on('drawn.geocoder', null); context.enter(iD.modes.Select(context, [id])); }); - - context.on('enter.geocoder', function() { - if (context.mode().id !== 'browse') { - context.on('enter.geocoder', null) - .map().on('drawn.geocoder', null); - } - }); } }