mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
Merge pull request #11235 from kangzhanlei/fit-fnLen
解决在组件不输入内容的情况下,LEN函数返回9的错误(undefined字符串的长度)
This commit is contained in:
commit
0adb1cfc1c
@ -1110,6 +1110,9 @@ export class Evaluator {
|
|||||||
* @returns {number} 长度
|
* @returns {number} 长度
|
||||||
*/
|
*/
|
||||||
fnLEN(text: string) {
|
fnLEN(text: string) {
|
||||||
|
if (text === undefined || text === null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
text = this.normalizeText(text);
|
text = this.normalizeText(text);
|
||||||
return text?.length;
|
return text?.length;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user