no parent

Signed-off-by: houhaoyu <houhaoyu@huawei.com>
Change-Id: I84b8116290e094d316b561177aa796c81436e965
This commit is contained in:
houhaoyu
2022-09-06 21:14:53 +08:00
parent b89477fedf
commit 9502fb33d7
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -541,7 +541,7 @@ function checkNeedUpdateFiles(file: string, needUpdate: NeedUpdateFlag, alreadyC
checkNeedUpdateFiles(value.children[i], needUpdate, alreadyCheckedFiles);
}
} else {
cache[file] = { mtimeMs, children: [], error: false };
cache[file] = { mtimeMs, children: [], parent: [], error: false };
needUpdate.flag = true;
}
}
+1
View File
@@ -219,6 +219,7 @@ function createOrUpdateCache(resolvedModules: ts.ResolvedModuleFull[], containin
if (value) {
value.mtimeMs = mtimeMs;
value.error = error;
value.parent = value.parent || [];
value.parent.push(path.resolve(containingFile));
value.parent = [...new Set(value.parent)];
} else {