Skip to content

Commit 902c489

Browse files
committed
Use nullish coalescing operator for loading results
1 parent a20d910 commit 902c489

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

extensions/ql-vscode/src/remote-queries/variant-analysis-results-manager.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,8 @@ export class VariantAnalysisResultsManager extends DisposableObject {
7272
repoTask: VariantAnalysisRepoTask
7373
): Promise<VariantAnalysisScannedRepositoryResult> {
7474
const result = this.cachedResults.get(createCacheKey(variantAnalysisId, repoTask));
75-
if (result) {
76-
return result;
77-
}
7875

79-
return this.loadResultsIntoMemory(variantAnalysisId, repoTask);
76+
return result ?? await this.loadResultsIntoMemory(variantAnalysisId, repoTask);
8077
}
8178

8279
private async loadResultsIntoMemory(

0 commit comments

Comments
 (0)