File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -230,18 +230,18 @@ namespace ts {
230
230
const readFileWithCache = ( fileName : string ) : string | undefined => {
231
231
const key = toPath ( fileName ) ;
232
232
const value = readFileCache . get ( key ) ;
233
- if ( value !== undefined ) return value || undefined ;
233
+ if ( value !== undefined ) return value !== false ? value : undefined ;
234
234
return setReadFileCache ( key , fileName ) ;
235
235
} ;
236
236
const setReadFileCache = ( key : Path , fileName : string ) => {
237
237
const newValue = originalReadFile . call ( host , fileName ) ;
238
- readFileCache . set ( key , newValue || false ) ;
238
+ readFileCache . set ( key , newValue !== undefined ? newValue : false ) ;
239
239
return newValue ;
240
240
} ;
241
241
host . readFile = fileName => {
242
242
const key = toPath ( fileName ) ;
243
243
const value = readFileCache . get ( key ) ;
244
- if ( value !== undefined ) return value || undefined ; // could be .d.ts from output
244
+ if ( value !== undefined ) return value !== false ? value : undefined ; // could be .d.ts from output
245
245
if ( ! fileExtensionIs ( fileName , Extension . Json ) ) {
246
246
return originalReadFile . call ( host , fileName ) ;
247
247
}
You can’t perform that action at this time.
0 commit comments