Skip to content

Commit f4a6fb7

Browse files
committed
Replace ternary expression
1 parent d8ee411 commit f4a6fb7

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
@@ -11040,7 +11040,7 @@ namespace ts {
1104011040

1104111041
function hasContextSensitiveReturnExpression(node: FunctionLikeDeclaration) {
1104211042
// TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value.
11043-
return !node.body || node.body.kind === SyntaxKind.Block ? false : isContextSensitive(node.body);
11043+
return !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
1104411044
}
1104511045

1104611046
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {

0 commit comments

Comments
 (0)