diff --git a/packages/shared/src/toDisplayString.ts b/packages/shared/src/toDisplayString.ts index 62a042be..efe3b7cc 100644 --- a/packages/shared/src/toDisplayString.ts +++ b/packages/shared/src/toDisplayString.ts @@ -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) &&