Skip to content

Commit 7158be0

Browse files
committed
fix mem-fs change event on refresh
1 parent f1bfab3 commit 7158be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/environment-base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
875875
// Conflicter can change files add listener before commit task.
876876
const changedFileHandler = (filePath: string) => {
877877
const file = this.sharedFs.get(filePath);
878-
if (isFilePending(file)) {
878+
if (file && isFilePending(file)) {
879879
queueCommit();
880880
this.sharedFs.removeListener('change', changedFileHandler);
881881
}

0 commit comments

Comments
 (0)