diff --git a/public/js/index.js b/public/js/index.js index c69cb753d..810d83534 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2635,16 +2635,15 @@ function initTopicbar() { }, function(data, textStatus, xhr){ if (xhr.responseJSON.status === 'ok') { viewDiv.children(".topic").remove(); - if (topics.length === 0) { - return - } - var topicArray = topics.split(","); + if (topics.length) { + var topicArray = topics.split(","); - var last = viewDiv.children("a").last(); - for (var i=0; i < topicArray.length; i++) { - $('