Skip to content

Commit e6aa7c2

Browse files
committed
Adds protection
1 parent a0a6891 commit e6aa7c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/trackers/documentTracker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ export class DocumentTracker<T> implements Disposable {
394394
if (this._documentMap.size === 0) return;
395395

396396
for await (const doc of this._documentMap.values()) {
397-
const repoPath = doc.uri.repoPath!.toLocaleLowerCase();
397+
const repoPath = doc.uri.repoPath?.toLocaleLowerCase();
398+
if (repoPath == null) continue;
399+
398400
if (changed?.removedRepoPaths?.has(repoPath)) {
399401
void this.remove(doc.document, doc);
400402
} else if (changed == null || changed?.addedOrChangedRepoPaths?.has(repoPath)) {

0 commit comments

Comments
 (0)