Skip to content

Commit 361e19b

Browse files
committed
Ensure no duplicates in named union list
1 parent 26bbdf1 commit 361e19b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13460,7 +13460,7 @@ namespace ts {
1346013460
if (t.flags & TypeFlags.Union) {
1346113461
const origin = (<UnionType>t).origin;
1346213462
if (t.aliasSymbol || origin && !(origin.flags & TypeFlags.Union)) {
13463-
namedUnions.push(t);
13463+
pushIfUnique(namedUnions, t);
1346413464
}
1346513465
else if (origin && origin.flags & TypeFlags.Union) {
1346613466
addNamedUnions(namedUnions, (<UnionType>origin).types);

0 commit comments

Comments
 (0)