mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
Fixed an accidental undefined leak into getAccessibleSymbolChain's cache key (#58669)
This commit is contained in:
parent
e4dc78ab8c
commit
32513a7745
@ -5566,7 +5566,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const cache = (links.accessibleChainCache ||= new Map());
|
||||
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
||||
const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);
|
||||
const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation && getNodeId(firstRelevantLocation)}|${meaning}`;
|
||||
const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;
|
||||
if (cache.has(key)) {
|
||||
return cache.get(key);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user