From 0c3a16f09f18b8ecf11c4ca7d37842017f94ffe0 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 11 Dec 2015 13:37:04 +0100 Subject: [PATCH] fix bug when file header is not displated for only issue on the issues page --- .../src/main/js/apps/issues/workspace-list-view.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js index 45efbf8dc0d..027b1eaebe3 100644 --- a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js +++ b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js @@ -85,9 +85,9 @@ export default WorkspaceListView.extend({ var $container = this.getChildViewContainer(compositeView), model = this.collection.at(index); if (model != null) { - var prev = this.collection.at(index - 1), - putComponent = prev == null; - if (prev != null) { + var prev = index > 0 && this.collection.at(index - 1), + putComponent = !prev; + if (prev) { var fullComponent = [model.get('project'), model.get('component')].join(' '), fullPrevComponent = [prev.get('project'), prev.get('component')].join(' '); if (fullComponent !== fullPrevComponent) { -- 2.39.5