some details
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user