From: Stas Vilchik Date: Fri, 11 Dec 2015 12:37:04 +0000 (+0100) Subject: fix bug when file header is not displated for only issue on the issues page X-Git-Tag: 5.3-RC2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c3a16f09f18b8ecf11c4ca7d37842017f94ffe0;p=sonarqube.git fix bug when file header is not displated for only issue on the issues page --- 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) {