Skip to content

Commit

Permalink
fix(template): null-safe error message extraction (#6358)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev authored Aug 6, 2024
1 parent 00edef3 commit 98b5069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/template-string/template-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ function buildBinaryExpression(head: any, tail: any) {
// Disallow undefined values for comparisons
if (left === undefined || right === undefined) {
const message = [leftRes, rightRes]
.map((res) => res.message)
.map((res) => res?.message)
.filter(Boolean)
.join(" ")
const err = new TemplateStringError({
Expand Down

0 comments on commit 98b5069

Please sign in to comment.