Skip to content

Commit 3793795

Browse files
committed
Workaround compile issues caused by PR
1 parent 00cc8ff commit 3793795

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/moduleSpecifiers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ function tryGetModuleNameFromRootDirs(rootDirs: readonly string[], moduleFileNam
996996
}
997997

998998
function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCanonicalFileName, canonicalSourceDirectory }: Info, importingSourceFile: SourceFile, host: ModuleSpecifierResolutionHost, options: CompilerOptions, userPreferences: UserPreferences, packageNameOnly?: boolean, overrideMode?: ResolutionMode): string | undefined {
999-
if (!host.fileExists || !host.readFile) {
999+
if (host.fileExists === undefined || !host.readFile) {
10001000
return undefined;
10011001
}
10021002
const parts: NodeModulePathParts = getNodeModulePathParts(path)!;
@@ -1145,7 +1145,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan
11451145
}
11461146

11471147
function tryGetAnyFileFromPath(host: ModuleSpecifierResolutionHost, path: string) {
1148-
if (!host.fileExists) return;
1148+
if (host.fileExists === undefined) return;
11491149
// We check all js, `node` and `json` extensions in addition to TS, since node module resolution would also choose those over the directory
11501150
const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: ScriptKind.JSON }]));
11511151
for (const e of extensions) {

src/compiler/sys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ let pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
131131
export let unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
132132

133133
function setCustomPollingValues(system: System) {
134-
if (!system.getEnvironmentVariable) {
134+
if (system.getEnvironmentVariable === undefined) {
135135
return;
136136
}
137137
const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);

0 commit comments

Comments
 (0)