From ebefba9e3255bd3832fba9df0e247825f5ab742e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 23 Mar 2018 10:57:35 +0100 Subject: [PATCH] Revert: move map-config assignment --- lib/cartodb/controllers/map.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index e476daf3..5eb89b58 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -341,6 +341,9 @@ function createLayergroup (mapBackend, userLimitsApi, pgConnection, affectedTabl params ); + res.locals.mapConfig = mapConfig; + res.locals.analysesResults = context.analysesResults; + const mapParams = { dbuser, dbname, dbpassword, dbhost, dbport }; mapBackend.createLayergroup(mapConfig, mapParams, mapConfigProvider, (err, layergroup) => { @@ -350,9 +353,7 @@ function createLayergroup (mapBackend, userLimitsApi, pgConnection, affectedTabl } res.body = layergroup; - res.locals.mapConfig = mapConfig; res.locals.mapConfigProvider = mapConfigProvider; - res.locals.analysesResults = context.analysesResults; next(); });