chore: check string first in toDisplayString
This commit is contained in:
parent
81a6708739
commit
bb43704b64
@ -5,7 +5,8 @@ import {
|
||||
isFunction,
|
||||
isPlainObject,
|
||||
isSet,
|
||||
objectToString
|
||||
objectToString,
|
||||
isString
|
||||
} from './index'
|
||||
|
||||
/**
|
||||
@ -13,7 +14,9 @@ import {
|
||||
* @private
|
||||
*/
|
||||
export const toDisplayString = (val: unknown): string => {
|
||||
return val == null
|
||||
return isString(val)
|
||||
? val
|
||||
: val == null
|
||||
? ''
|
||||
: isArray(val) ||
|
||||
(isObject(val) &&
|
||||
|
Loading…
Reference in New Issue
Block a user