]> source.dussan.org Git - sonarqube.git/commitdiff
fix bug when file header is not displated for only issue on the issues page
authorStas Vilchik <vilchiks@gmail.com>
Fri, 11 Dec 2015 12:37:04 +0000 (13:37 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 11 Dec 2015 12:37:04 +0000 (13:37 +0100)
server/sonar-web/src/main/js/apps/issues/workspace-list-view.js

index 45efbf8dc0da2a408b0ead539bdf53a740b73247..027b1eaebe36cbf1320a91a9f56a1a9d07d46fa1 100644 (file)
@@ -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) {