Skip to content

Commit cb8aa9b

Browse files
committed
Don't use invalid cached SourceFiles
1 parent 19ab8ab commit cb8aa9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/harness/fakes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ namespace fakes {
332332
if (cacheKey) {
333333
const meta = this.vfs.filemeta(canonicalFileName);
334334
const sourceFileFromMetadata = meta.get(cacheKey) as ts.SourceFile | undefined;
335-
if (sourceFileFromMetadata) {
335+
if (sourceFileFromMetadata && sourceFileFromMetadata.getFullText() === content) {
336336
this._sourceFiles.set(canonicalFileName, sourceFileFromMetadata);
337337
return sourceFileFromMetadata;
338338
}

0 commit comments

Comments
 (0)