diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/workspace-list-view.js | 6 |
1 files 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) { |