]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5718 Fix infinite loading of issues when there is only one in the list
authorStas Vilchik <vilchiks@gmail.com>
Mon, 3 Nov 2014 09:11:02 +0000 (10:11 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 3 Nov 2014 15:48:57 +0000 (16:48 +0100)
server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee

index 2dae2a47be35e26e3571ad94506f97246deca27d..b354c7a861e92bbe82c6d1ab948f5c483db96c93 100644 (file)
@@ -193,7 +193,8 @@ define [
     requestIssues: ->
       lastIssue = @options.app.issues.at @options.app.issues.length - 1
       lastLine = _.last(@source.get('formattedSource')).lineNumber
-      needMore = lastIssue.get('component') == @model.get 'key'
+      needMore = !@options.app.state.get('maxResultsReached')
+      needMore = needMore && (lastIssue.get('component') == @model.get 'key')
       needMore = needMore && (lastIssue.get('line') <= lastLine)
       if needMore
         @options.app.controller.fetchNextPage().done =>