mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 07:55:10 -05:00
Merge pull request #11893 from Microsoft/truthy_enum
Fix bug: We want to test for existence of the enum value, not whether it's non-zero
This commit is contained in:
@@ -333,7 +333,7 @@ namespace ts {
|
||||
if (host.resolveModuleNames) {
|
||||
resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => {
|
||||
// An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName.
|
||||
if (!resolved || resolved.extension) {
|
||||
if (!resolved || resolved.extension !== undefined) {
|
||||
return resolved;
|
||||
}
|
||||
resolved = clone(resolved);
|
||||
|
||||
Reference in New Issue
Block a user