Skip to content

Commit

Permalink
fix(typescript): create a new file did not update sys cache
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 21, 2024
1 parent 0f861d5 commit 6d7a542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typescript/lib/protocol/createSys.ts
Expand Up @@ -43,7 +43,7 @@ export function createSys(
const dirName = path.dirname(fileName);
const baseName = path.basename(fileName);
const dir = getDir(dirName);
if (dir.files.has(baseName)) { // is requested file
if (dir.files.has(baseName) || dir.requestedRead) { // is requested file or directory
version++;
if (change.type === 1 satisfies typeof FileChangeType.Created || change.type === 2 satisfies typeof FileChangeType.Changed) {
dir.files.set(baseName, {
Expand Down

0 comments on commit 6d7a542

Please sign in to comment.