Skip to content

Commit e4d32d8

Browse files
committed
fix string concat
1 parent 6a2f996 commit e4d32d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4978,7 +4978,8 @@ namespace ts {
49784978
return true;
49794979
}
49804980
else if (expr.kind === SyntaxKind.BinaryExpression) {
4981-
return isStringConcatExpression((<BinaryExpression>expr).left) && isStringConcatExpression((<BinaryExpression>expr).right);
4981+
const binaryExpression = <BinaryExpression>expr;
4982+
return binaryExpression.operatorToken.kind === SyntaxKind.PlusToken && isStringConcatExpression(binaryExpression.left) && isStringConcatExpression(binaryExpression.right);
49824983
}
49834984
return false;
49844985
}

0 commit comments

Comments
 (0)