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; }