File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -19600,16 +19600,16 @@ namespace ts {
19600
19600
// We stop inferring and report a circularity if we encounter duplicate recursion identities on both
19601
19601
// the source side and the target side.
19602
19602
const saveExpandingFlags = expandingFlags;
19603
- const sourceIdentity = getRecursionIdentity(source);
19604
- const targetIdentity = getRecursionIdentity(target);
19605
- if (sourceIdentity && contains(sourceStack, sourceIdentity)) expandingFlags |= ExpandingFlags.Source;
19606
- if (targetIdentity && contains(targetStack, targetIdentity)) expandingFlags |= ExpandingFlags.Target;
19603
+ const sourceIdentity = getRecursionIdentity(source) || source ;
19604
+ const targetIdentity = getRecursionIdentity(target) || target ;
19605
+ if (contains(sourceStack, sourceIdentity)) expandingFlags |= ExpandingFlags.Source;
19606
+ if (contains(targetStack, targetIdentity)) expandingFlags |= ExpandingFlags.Target;
19607
19607
if (expandingFlags !== ExpandingFlags.Both) {
19608
- if (sourceIdentity) (sourceStack || (sourceStack = [])).push(sourceIdentity);
19609
- if (targetIdentity) (targetStack || (targetStack = [])).push(targetIdentity);
19608
+ (sourceStack || (sourceStack = [])).push(sourceIdentity);
19609
+ (targetStack || (targetStack = [])).push(targetIdentity);
19610
19610
action(source, target);
19611
- if (targetIdentity) targetStack.pop();
19612
- if (sourceIdentity) sourceStack.pop();
19611
+ targetStack.pop();
19612
+ sourceStack.pop();
19613
19613
}
19614
19614
else {
19615
19615
inferencePriority = InferencePriority.Circularity;
You can’t perform that action at this time.
0 commit comments