]> source.dussan.org Git - sonarqube.git/commitdiff
fix loading more code
authorStas Vilchik <vilchiks@gmail.com>
Tue, 1 Nov 2016 16:53:07 +0000 (17:53 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 1 Nov 2016 16:53:07 +0000 (17:53 +0100)
server/sonar-web/src/main/js/components/source-viewer/main.js

index f1bdef0ea5664ac84765f360dcba63537483167f..50d476d0f57d68e8882d9975b4538717d693cf43 100644 (file)
@@ -209,8 +209,8 @@ export default Marionette.LayoutView.extend({
         // don't display global error
         403: null
       }
-    }).done(function (data) {
-      let source = (data.sources || []).slice(0);
+    }).done(function (r) {
+      let source = (r.sources || []).slice(0);
       if (source.length === 0 || (source.length > 0 && _.first(source).line === 1)) {
         source.unshift({ line: 0 });
       }
@@ -225,7 +225,7 @@ export default Marionette.LayoutView.extend({
         source,
         hasCoverage: that.model.hasCoverage(source),
         hasSourceBefore: firstLine > 1,
-        hasSourceAfter: data.sources.length === linesRequested
+        hasSourceAfter: r.sources.length === linesRequested
       });
       that.model.checkIfHasDuplications();
     }).fail(function (request) {