From 98b50698c0e1eeec89032c3c650e986fdf37bba6 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev <10628074+vvagaytsev@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:54:41 +0200 Subject: [PATCH] fix(template): null-safe error message extraction (#6358) --- core/src/template-string/template-string.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/template-string/template-string.ts b/core/src/template-string/template-string.ts index b38f665525..c72290e75e 100644 --- a/core/src/template-string/template-string.ts +++ b/core/src/template-string/template-string.ts @@ -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({