From 988305686a8c1d9ed76b7234bd7fe17acd109610 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Wed, 31 May 2017 17:44:01 -0400 Subject: [PATCH] pass empty object to Placeholder when not in config --- routes/v1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/v1.js b/routes/v1.js index 454d30b8..821db197 100644 --- a/routes/v1.js +++ b/routes/v1.js @@ -92,7 +92,7 @@ function addRoutes(app, peliasConfig) { const pipService = require('../service/pointinpolygon')(peliasConfig.api.pipService); - const placeholderConfiguration = new PlaceHolder(peliasConfig.api.services.placeholder); + const placeholderConfiguration = new PlaceHolder(_.get(peliasConfig.api.services, 'placeholder', {})); const placeholderService = serviceWrapper(placeholderConfiguration); const isPlaceholderServiceEnabled = _.constant(placeholderConfiguration.isEnabled());