fixes forking

if there are no tags just return
v1.18.x
barisusakli 11 years ago
parent b6e0a2ecce
commit 1a753bf64d

@ -9,7 +9,10 @@ var async = require('async'),
module.exports = function(Topics) {
Topics.createTags = function(tags, tid, timestamp, callback) {
if(Array.isArray(tags)) {
if (!Array.isArray(tags) || !tags.length) {
return callback();
}
tags = tags.slice(0, meta.config.tagsPerTopic || 5);
async.each(tags, function(tag, next) {
@ -27,7 +30,6 @@ module.exports = function(Topics) {
next(err);
});
}, callback);
}
};
function cleanUpTag(tag) {

Loading…
Cancel
Save