Appease linter.

This commit is contained in:
Jason Reed
2020-06-30 11:13:10 -04:00
parent 94d230308c
commit ec45db3bc3
3 changed files with 8 additions and 9 deletions

View File

@@ -388,13 +388,13 @@ export class InterfaceManager extends DisposableObject {
pageNumber: number pageNumber: number
): Promise<void> { ): Promise<void> {
if (this._displayedQuery === undefined) { if (this._displayedQuery === undefined) {
throw new Error(`Trying to show interpreted results but displayed query was undefined`); throw new Error('Trying to show interpreted results but displayed query was undefined');
} }
if (this._interpretation === undefined) { if (this._interpretation === undefined) {
throw new Error(`Trying to show interpreted results but interpretation was undefined`); throw new Error('Trying to show interpreted results but interpretation was undefined');
} }
if (this._interpretation.sarif.runs[0].results === undefined) { if (this._interpretation.sarif.runs[0].results === undefined) {
throw new Error(`Trying to show interpreted results but results were undefined`); throw new Error('Trying to show interpreted results but results were undefined');
} }
const resultSetSchemas = await this.getResultSetSchemas(this._displayedQuery); const resultSetSchemas = await this.getResultSetSchemas(this._displayedQuery);
@@ -524,7 +524,7 @@ export class InterfaceManager extends DisposableObject {
INTERPRETED_RESULTS_PAGE_SIZE * pageNumber, INTERPRETED_RESULTS_PAGE_SIZE * pageNumber,
INTERPRETED_RESULTS_PAGE_SIZE * (pageNumber + 1) INTERPRETED_RESULTS_PAGE_SIZE * (pageNumber + 1)
) )
} };
} }
if (this._interpretation === undefined) { if (this._interpretation === undefined) {
@@ -537,7 +537,7 @@ export class InterfaceManager extends DisposableObject {
return { return {
...interp, ...interp,
sarif: { ...interp.sarif, runs: [getPageOfRun(interp.sarif.runs[0])] }, sarif: { ...interp.sarif, runs: [getPageOfRun(interp.sarif.runs[0])] },
} };
} }
private async interpretResultsInfo( private async interpretResultsInfo(

View File

@@ -117,7 +117,7 @@ export class ResultTables
* true as long as the result sets we're given are marked to permit it. * true as long as the result sets we're given are marked to permit it.
*/ */
paginationEnabled(): boolean { paginationEnabled(): boolean {
return this.paginationAllowed() return this.paginationAllowed();
} }
constructor(props: ResultTablesProps) { constructor(props: ResultTablesProps) {

View File

@@ -197,7 +197,7 @@ class App extends React.Component<{}, ResultsViewState> {
this.loadResults(); this.loadResults();
break; break;
case 'showInterpretedPage': case 'showInterpretedPage':
const resultsInfo: ResultsInfo = { this.updateStateWithNewResultsInfo({
resultsPath: '', // FIXME: Not used for interpreted, refactor so this is not needed resultsPath: '', // FIXME: Not used for interpreted, refactor so this is not needed
parsedResultSets: { parsedResultSets: {
t: 'ExtensionParsed', t: 'ExtensionParsed',
@@ -218,8 +218,7 @@ class App extends React.Component<{}, ResultsViewState> {
interpretation: msg.interpretation, interpretation: msg.interpretation,
shouldKeepOldResultsWhileRendering: true, shouldKeepOldResultsWhileRendering: true,
metadata: msg.metadata, metadata: msg.metadata,
}; });
this.updateStateWithNewResultsInfo(resultsInfo);
this.loadResults(); this.loadResults();
break; break;
case 'resultsUpdating': case 'resultsUpdating':