Skip to content

Commit

Permalink
chore: 调整 invalid label 展示, 无数据是展示 - (baidu#11308)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop authored and allenve committed Dec 12, 2024
1 parent 174cef9 commit edcb571
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/amis-core/src/utils/labelToString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import isPlainObject from 'lodash/isPlainObject';

export function labelToString(label: any): string {
const type = typeof label;
if (type === 'undefined' || label === null) {
// render placeholder
return '-';
}
if (type === 'string') {
return label;
} else if (type === 'number') {
Expand Down

0 comments on commit edcb571

Please # to comment.