Skip to content

Commit

Permalink
Fix (partially) audited bug by reading what concat actually does.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdprng committed Sep 13, 2024
1 parent a52401a commit 4f19eee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/codeMarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ class WARoot {
* @param files The array of audited files to be concatenated.
*/
concatAudited(files: AuditedFile[]) {
this.auditedFiles.concat(files);
this.auditedFiles = this.auditedFiles.concat(files);
}

/**
Expand All @@ -492,7 +492,7 @@ class WARoot {
* @param files The array of audited files to be concatenated.
*/
concatPartiallyAudited(files: PartiallyAuditedFile[]) {
this.partiallyAuditedFiles.concat(files);
this.partiallyAuditedFiles = this.partiallyAuditedFiles.concat(files);
}

/**
Expand Down Expand Up @@ -2760,7 +2760,10 @@ export class CodeMarker implements vscode.TreeDataProvider<TreeEntry> {
this.treeEntries = this.treeEntries.concat(newTreeEntries);
wsRoot.concatAudited(fullParsedEntries.auditedFiles);
// handle older versions of the extension that don't have partially audited entries
wsRoot.concatPartiallyAudited(fullParsedEntries.partiallyAuditedFiles ?? []);
if (fullParsedEntries.partiallyAuditedFiles !== undefined){
wsRoot.concatPartiallyAudited(fullParsedEntries.partiallyAuditedFiles);
}

// handle older versions of the extension that don't have resolved entries
if (fullParsedEntries.resolvedEntries !== undefined) {
this.resolvedEntries = this.resolvedEntries.concat(fullParsedEntries.resolvedEntries);
Expand Down

0 comments on commit 4f19eee

Please sign in to comment.