mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-07 16:12:53 +01:00
update count even if its 0
This commit is contained in:
@@ -66,9 +66,10 @@ module.exports = function(Topics) {
|
||||
function updateTagCount(tag, callback) {
|
||||
callback = callback || function() {};
|
||||
Topics.getTagTopicCount(tag, function(err, count) {
|
||||
if (err || !count) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
count = count || 0;
|
||||
|
||||
db.sortedSetAdd('tags:topic:count', count, tag, callback);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user