Skip to content

Node.js based forum software built for the modern web

tag changes

barisusaklic98b6b763049
diff --git a/src/controllers/tags.js b/src/controllers/tags.js
index b6345bc840..ba1ec919b2 100644
--- a/src/controllers/tags.js
+++ b/src/controllers/tags.js
@@ -82,9 +82,7 @@ tagsController.getTags = function(req, res, next) {
if (err) {
return next(err);
}
- tags = tags.filter(function(tag) {
- return tag && tag.score > 0;
- });
+ tags = tags.filter(Boolean);
var data = {
tags: tags,
nextStart: 100,
diff --git a/src/topics/tags.js b/src/topics/tags.js
index ee5f7d8b9d..f7a38ca583 100644
--- a/src/topics/tags.js
+++ b/src/topics/tags.js
@@ -64,7 +64,7 @@ module.exports = function(Topics) {
},
function(isMember, next) {
if (isMember) {
- return callback(new Error('[[error:tag-exists]]'));
+ return next();
}
db.sortedSetAdd('tags:topic:count', 0, tag, next);
}