mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-02 02:21:14 +01:00
fix so that empty categories dont 404
This commit is contained in:
@@ -20,11 +20,7 @@ var RDB = require('./redis.js'),
|
||||
var range_var = (category_id) ? 'categories:' + category_id + ':tid' : 'topics:tid';
|
||||
|
||||
RDB.smembers(range_var, function(err, tids) {
|
||||
|
||||
if(tids.length === 0) {
|
||||
callback(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var title = [],
|
||||
uid = [],
|
||||
@@ -71,6 +67,11 @@ var RDB = require('./redis.js'),
|
||||
|
||||
multi.exec(function(err, replies) {
|
||||
category_name = replies[0];
|
||||
|
||||
if(category_name === null) {
|
||||
callback(false);
|
||||
return;
|
||||
}
|
||||
active_usernames = replies[1];
|
||||
var topics = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user