浏览代码

Adds protection

main
Eric Amodio 1年前
父节点
当前提交
e6aa7c2d6a
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      src/trackers/documentTracker.ts

+ 3
- 1
src/trackers/documentTracker.ts 查看文件

@ -394,7 +394,9 @@ export class DocumentTracker implements Disposable {
if (this._documentMap.size === 0) return; if (this._documentMap.size === 0) return;
for await (const doc of this._documentMap.values()) { for await (const doc of this._documentMap.values()) {
const repoPath = doc.uri.repoPath!.toLocaleLowerCase();
const repoPath = doc.uri.repoPath?.toLocaleLowerCase();
if (repoPath == null) continue;
if (changed?.removedRepoPaths?.has(repoPath)) { if (changed?.removedRepoPaths?.has(repoPath)) {
void this.remove(doc.document, doc); void this.remove(doc.document, doc);
} else if (changed == null || changed?.addedOrChangedRepoPaths?.has(repoPath)) { } else if (changed == null || changed?.addedOrChangedRepoPaths?.has(repoPath)) {

正在加载...
取消
保存