mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Replace has with get and check undefined
This commit is contained in:
@@ -160,7 +160,8 @@ namespace ts.JsTyping {
|
||||
}
|
||||
// Add the cached typing locations for inferred typings that are already installed
|
||||
packageNameToTypingLocation.forEach((typing, name) => {
|
||||
if (inferredTypings.has(name) && inferredTypings.get(name) === undefined && typesRegistry.has(name) && isTypingUpToDate(typing, typesRegistry.get(name)!)) {
|
||||
const registryEntry = typesRegistry.get(name);
|
||||
if (inferredTypings.has(name) && inferredTypings.get(name) === undefined && registryEntry !== undefined && isTypingUpToDate(typing, typesRegistry.get(name)!)) {
|
||||
inferredTypings.set(name, typing.typingLocation);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user