diff --git a/lib/events.js b/lib/events.js index a47fb65..07cc46a 100644 --- a/lib/events.js +++ b/lib/events.js @@ -397,10 +397,6 @@ MapboxEventManager.prototype = { shouldEnableLogging: function(options){ if (options.enableEventLogging === false) return false; if (options.origin && options.origin !== 'https://api.mapbox.com') return false; - // hard to make sense of events when a local instance is suplementing results from origin - if (options.localGeocoder) return false; - // hard to make sense of events when a custom filter is in use - if (options.filter) return false; return true; }, diff --git a/test/events.test.js b/test/events.test.js index c242e2d..b9ee2ee 100644 --- a/test/events.test.js +++ b/test/events.test.js @@ -265,11 +265,11 @@ test('should enable logging', function(assert){ assert.true(eventsManagerMapbox.shouldEnableLogging(mapboxOptions), 'logging is enabled when origin is mapbox'); mapboxOptions.filter = function(){return true}; - assert.false(eventsManagerMapbox.shouldEnableLogging(mapboxOptions), 'logging is disabled when a custom filter is enabled'); + assert.true(eventsManagerMapbox.shouldEnableLogging(mapboxOptions), 'logging is disabled when a custom filter is enabled'); mapboxOptions.filter = undefined; mapboxOptions.localGeocoder = function(){return 'abc'} - assert.false(eventsManagerMapbox.shouldEnableLogging(mapboxOptions), 'logging is disabled when a custom geocoder is enabled'); + assert.true(eventsManagerMapbox.shouldEnableLogging(mapboxOptions), 'logging is disabled when a custom geocoder is enabled'); assert.end(); });