Fix infinite recursion in geocoder (fixes #1580)

This commit is contained in:
John Firebaugh
2013-06-06 10:46:30 -07:00
parent 8d3b6fd479
commit 25223a3920
+1 -7
View File
@@ -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);
}
});
}
}