mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-17 01:55:50 -06:00
Fix length check in typeArgumentsRelatedTo
This commit is contained in:
parent
99e6542842
commit
c700bf9e7d
@ -5232,8 +5232,9 @@ namespace ts {
|
||||
if (sources.length !== targets.length && relation === identityRelation) {
|
||||
return Ternary.False;
|
||||
}
|
||||
const length = sources.length <= targets.length ? sources.length : targets.length;
|
||||
let result = Ternary.True;
|
||||
for (let i = 0; i < targets.length; i++) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const related = isRelatedTo(sources[i], targets[i], reportErrors);
|
||||
if (!related) {
|
||||
return Ternary.False;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user