diff --git a/lib/cartodb/backends/template_maps.js b/lib/cartodb/backends/template_maps.js index ac1308cd..1e8dc51e 100644 --- a/lib/cartodb/backends/template_maps.js +++ b/lib/cartodb/backends/template_maps.js @@ -305,7 +305,7 @@ TemplateMaps.prototype.updTemplate = function(owner, tpl_id, template, callback) } if (tpl_id !== template.name) { - return callback(new Error("Cannot update name of a map template ('" + tpl_id + "' != '" + template.name + "')")); + return callback(new Error(`Cannot update name of a map template ('${tpl_id}' != '${template.name}')`)); } var userTemplatesKey = this.key_usr_tpl({ owner }); @@ -321,7 +321,7 @@ TemplateMaps.prototype.updTemplate = function(owner, tpl_id, template, callback) let templateString; try { - templateString = JSON.stringify(template) + templateString = JSON.stringify(template); } catch (error) { return callback(error); } @@ -337,7 +337,7 @@ TemplateMaps.prototype.updTemplate = function(owner, tpl_id, template, callback) let beforeUpdateTemplateObject; try { - beforeUpdateTemplateObject = JSON.parse(beforeUpdateTemplate) + beforeUpdateTemplateObject = JSON.parse(beforeUpdateTemplate); } catch (error) { return callback(error); }