Skip to content

Commit e7a0c58

Browse files
author
Dave Bartolomeo
committed
Fix CodeQL alert
1 parent 02270aa commit e7a0c58

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

extensions/ql-vscode/src/log-insights/log-scanner-service.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,13 @@ export class LogScannerService extends DisposableObject {
7575
): Promise<void> {
7676
this.diagnosticCollection.clear();
7777

78-
if ((query === undefined) || (query.t !== 'local')) {
78+
if ((query === undefined) || (query.t !== 'local') || (query.jsonEvalLogSummaryLocation === undefined)) {
7979
return;
8080
}
8181

82-
if ((query !== undefined) && (query.t === 'local') && query.jsonEvalLogSummaryLocation) {
83-
const diagnostics = await this.scanLog(query.jsonEvalLogSummaryLocation, query.evalLogSummarySymbolsLocation);
84-
const uri = Uri.file(query.evalLogSummaryLocation!);
85-
this.diagnosticCollection.set(uri, diagnostics);
86-
}
82+
const diagnostics = await this.scanLog(query.jsonEvalLogSummaryLocation, query.evalLogSummarySymbolsLocation);
83+
const uri = Uri.file(query.evalLogSummaryLocation!);
84+
this.diagnosticCollection.set(uri, diagnostics);
8785
}
8886

8987
/**

0 commit comments

Comments
 (0)