Use the returned template instead of the cached one

This commit is contained in:
Daniel García Aubert
2018-05-30 18:18:42 +02:00
parent 5fc49ab3c2
commit eabd25ee6a
@@ -62,7 +62,7 @@ NamedMapMapConfigProvider.prototype.getMapConfig = function(callback) {
var context = {};
this.getTemplate((err, tpl) => {
this.getTemplate((err, template) => {
if (err) {
this.err = err;
return callback(err);
@@ -101,7 +101,7 @@ NamedMapMapConfigProvider.prototype.getMapConfig = function(callback) {
let requestMapConfig;
try {
requestMapConfig = this.templateMaps.instance(this.template, templateParams);
requestMapConfig = this.templateMaps.instance(template, templateParams);
} catch (err) {
this.err = err;
return callback(err);