From c3b0e979b281795b5ff8a77a7184b9b23c3bfb2e Mon Sep 17 00:00:00 2001 From: kzl Date: Thu, 21 Nov 2024 07:57:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=EF=BC=8CLEN=E5=87=BD=E6=95=B0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E9=E7=9A=84=E9=94=99=E8=AF=AF=EF=BC=88undefined?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=9A=84=E9=95=BF=E5=BA=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-formula/src/evalutor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/amis-formula/src/evalutor.ts b/packages/amis-formula/src/evalutor.ts index bf802adcd3b..307797036d1 100644 --- a/packages/amis-formula/src/evalutor.ts +++ b/packages/amis-formula/src/evalutor.ts @@ -1110,6 +1110,9 @@ export class Evaluator { * @returns {number} 长度 */ fnLEN(text: string) { + if (text === undefined || text === null) { + return 0; + } text = this.normalizeText(text); return text?.length; }