Merge pull request #11235 from kangzhanlei/fit-fnLen

解决在组件不输入内容的情况下,LEN函数返回9的错误(undefined字符串的长度)
This commit is contained in:
hsm-lv 2024-11-22 17:24:01 +08:00 committed by GitHub
commit 0adb1cfc1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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