Skip to content

Commit 570f3d2

Browse files
committed
Simplify fix
1 parent ae1e8d2 commit 570f3d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15863,7 +15863,7 @@ namespace ts {
1586315863
}
1586415864
}
1586515865
}
15866-
if (unionParent && !result) {
15866+
if (unionParent && !result && source.flags & TypeFlags.Union) {
1586715867
// The easiest way to get the right errors here is to un-defer (which may be costly)
1586815868
// If it turns out this is too costly too often, we can replicate the error handling logic within
1586915869
// typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union

0 commit comments

Comments
 (0)