mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Ensure toString coerces nullish values in arrays to strings.
This commit is contained in:
@@ -37,7 +37,7 @@ function toString(value) {
|
|||||||
}
|
}
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
// Recursively convert values (susceptible to call stack limits).
|
// Recursively convert values (susceptible to call stack limits).
|
||||||
return `${ arrayMap(value, toString) }`
|
return `${ arrayMap(value, (other) => other == null ? other : toString(other)) }`
|
||||||
}
|
}
|
||||||
if (isSymbol(value)) {
|
if (isSymbol(value)) {
|
||||||
return symbolToString ? symbolToString.call(value) : ''
|
return symbolToString ? symbolToString.call(value) : ''
|
||||||
|
|||||||
Reference in New Issue
Block a user