mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
解决在组件不输入内容的情况下,LEN函数返回9的错误(undefined字符串的长度)
This commit is contained in:
parent
8c046312c0
commit
c3b0e979b2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user