Browse Source

switch to _.defaultTo since it's more descriptive

pull/875/head
Stephen Hess 8 years ago
parent
commit
c129dec3bf
  1. 4
      routes/v1.js

4
routes/v1.js

@ -88,11 +88,11 @@ const PlaceHolder = require('../service/configurations/PlaceHolder');
function addRoutes(app, peliasConfig) {
const esclient = elasticsearch.Client(peliasConfig.esclient);
const pipConfiguration = new PointInPolygon(peliasConfig.api.services.pip);
const pipConfiguration = new PointInPolygon(_.defaultTo(peliasConfig.api.services.pip, {}));
const pipService = serviceWrapper(pipConfiguration);
const isPipServiceEnabled = _.constant(pipConfiguration.isEnabled());
const placeholderConfiguration = new PlaceHolder(_.get(peliasConfig.api.services, 'placeholder', {}));
const placeholderConfiguration = new PlaceHolder(_.defaultTo(peliasConfig.api.services.placeholder, {}));
const placeholderService = serviceWrapper(placeholderConfiguration);
const isPlaceholderServiceEnabled = _.constant(placeholderConfiguration.isEnabled());

Loading…
Cancel
Save