Skip to content

Commit b267256

Browse files
author
Maria Solano
committed
Move target type calculation inside if
1 parent 86295fb commit b267256

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
@@ -22627,8 +22627,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2262722627
}
2262822628
let i = 0;
2262922629
for (const type of target.types) {
22630-
const targetType = getTypeOfPropertyOfType(type, propertyName);
2263122630
if (discriminable[i] === undefined) {
22631+
const targetType = getTypeOfPropertyOfType(type, propertyName);
2263222632
discriminable[i] = !!(targetType && related(getDiscriminatingType(), targetType));
2263322633
}
2263422634
i++;

0 commit comments

Comments
 (0)