diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index e9e194f0b..34df7ad5f 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -416,12 +416,12 @@ var ProjectsIndex = (function() { viewContainer.removeClass('no-results no-data'); viewContainer.find('.card, .projects-group, .no-results-container, .no-data-container').remove(); - if (viewContainer.find('.list').length) { + viewContainer.append(data.cards_html); + + if (viewContainer.hasClass('list')) { viewContainer.find('.table-header').show(); } - viewContainer.append(data.cards_html); - if (viewContainer.find('.no-results-container').length) { viewContainer.addClass('no-results'); }