diff --git a/lib/cartodb/backends/template_maps.js b/lib/cartodb/backends/template_maps.js index ea639084..17ed8f6e 100644 --- a/lib/cartodb/backends/template_maps.js +++ b/lib/cartodb/backends/template_maps.js @@ -184,7 +184,7 @@ TemplateMaps.prototype._checkUserTemplatesLimit = function(userTemplatesKey, own const limit = this._userTemplateLimit(); if(!limit) { - return callback(null); + return callback(); } this._redisCmd('HLEN', [userTemplatesKey], (err, numberOfTemplates) => { @@ -200,7 +200,7 @@ TemplateMaps.prototype._checkUserTemplatesLimit = function(userTemplatesKey, own return callback(limitReachedError); } - return callback(null); + return callback(); }); }; @@ -251,7 +251,7 @@ TemplateMaps.prototype.addTemplate = function(owner, template, callback) { } this.emit('add', owner, template.name, template); - callback(err, template.name, template); + callback(null, template.name, template); }); }); }; @@ -346,7 +346,7 @@ TemplateMaps.prototype.updTemplate = function(owner, tpl_id, template, callback) this.emit('update', owner, template.name, template); } - return callback(err, template); + return callback(null, template); }); }); };