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 lqPrototype committed Dec 5, 2024
1 parent 1c11627 commit 9e32209
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 9e32209

Please sign in to comment.