mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
fixing issue where navigating to a non-existant category_id caused NodeBB
to crash
This commit is contained in:
@@ -67,7 +67,12 @@
|
||||
};
|
||||
|
||||
Feed.updateCategory = function(cid) {
|
||||
categories.getCategoryById(cid, 0, function(categoryData) {
|
||||
categories.getCategoryById(cid, 0, function(err, categoryData) {
|
||||
if (err) {
|
||||
console.log('Error: Could not update RSS feed for category ' + cid);
|
||||
return;
|
||||
}
|
||||
|
||||
var location = '/category/' + categoryData.category_id + '/' + categoryData.category_name,
|
||||
xml_url = '/category' + cid + '.rss';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user