mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +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)) {
|
||||
// Recursively convert values (susceptible to call stack limits).
|
||||
return `${ arrayMap(value, toString) }`
|
||||
return `${ arrayMap(value, (other) => other == null ? other : toString(other)) }`
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return symbolToString ? symbolToString.call(value) : ''
|
||||
|
||||
Reference in New Issue
Block a user