small tweak

This commit is contained in:
barisusakli
2014-08-07 00:02:20 -04:00
parent 84aadc03fd
commit 8e8b678d40

View File

@@ -26,11 +26,7 @@ var async = require('async'),
Topics.getTopicData = function(tid, callback) {
Topics.getTopicsData([tid], function(err, topics) {
if (err) {
return callback(err);
}
callback(null, topics ? topics[0] : null);
callback(err, Array.isArray(topics) && topics.length ? topics[0] : null);
});
};