Skip to content

Commit ed82fdd

Browse files
author
Andy Hanson
committed
Fix bug: We want to test for existence of the enum value, not whether it's non-zero
1 parent b5ba315 commit ed82fdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/program.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ namespace ts {
333333
if (host.resolveModuleNames) {
334334
resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => {
335335
// An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName.
336-
if (!resolved || resolved.extension) {
336+
if (!resolved || resolved.extension === undefined) {
337337
return resolved;
338338
}
339339
resolved = clone(resolved);

0 commit comments

Comments
 (0)