some details

This commit is contained in:
Simon Martín
2018-08-01 15:53:41 +02:00
parent 0e28348e16
commit e5b75abc76
+3 -3
View File
@@ -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);
}