From: Stas Vilchik Date: Tue, 1 Nov 2016 16:53:07 +0000 (+0100) Subject: fix loading more code X-Git-Tag: 6.2-RC1~231 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7a1023786ef6deacd347cdd6736d0238b2f091d0;p=sonarqube.git fix loading more code --- diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js index f1bdef0ea56..50d476d0f57 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/main.js +++ b/server/sonar-web/src/main/js/components/source-viewer/main.js @@ -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) {