We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81a6708 commit bb43704Copy full SHA for bb43704
packages/shared/src/toDisplayString.ts
@@ -5,15 +5,18 @@ import {
5
isFunction,
6
isPlainObject,
7
isSet,
8
- objectToString
+ objectToString,
9
+ isString
10
} from './index'
11
12
/**
13
* For converting {{ interpolation }} values to displayed strings.
14
* @private
15
*/
16
export const toDisplayString = (val: unknown): string => {
- return val == null
17
+ return isString(val)
18
+ ? val
19
+ : val == null
20
? ''
21
: isArray(val) ||
22
(isObject(val) &&
0 commit comments