From bf6a38904a744d13b7561307503b17282b779a4c Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Tue, 23 Jul 2013 14:44:13 -0400 Subject: [PATCH] skip loading a topic if cant load its data --- src/categories.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/categories.js b/src/categories.js index b9bc05a252..4bd644bf24 100644 --- a/src/categories.js +++ b/src/categories.js @@ -174,7 +174,10 @@ var RDB = require('./redis.js'), function loadTopic(tid, callback) { topics.getTopicData(tid, function(topicData) { - + if(!topicData) { + return callback(null); + } + getTopicInfo(topicData, function(topicInfo) { topicData['pin-icon'] = topicData.pinned === '1' ? 'icon-pushpin' : 'none';