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 {
230230 const readFileWithCache = ( fileName : string ) : string | undefined => {
231231 const key = toPath ( fileName ) ;
232232 const value = readFileCache . get ( key ) ;
233- if ( value !== undefined ) return value || undefined ;
233+ if ( value !== undefined ) return value !== false ? value : undefined ;
234234 return setReadFileCache ( key , fileName ) ;
235235 } ;
236236 const setReadFileCache = ( key : Path , fileName : string ) => {
237237 const newValue = originalReadFile . call ( host , fileName ) ;
238- readFileCache . set ( key , newValue || false ) ;
238+ readFileCache . set ( key , newValue !== undefined ? newValue : false ) ;
239239 return newValue ;
240240 } ;
241241 host . readFile = fileName => {
242242 const key = toPath ( fileName ) ;
243243 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
245245 if ( ! fileExtensionIs ( fileName , Extension . Json ) ) {
246246 return originalReadFile . call ( host , fileName ) ;
247247 }
You can’t perform that action at this time.
0 commit comments