Ensure _.toString does not throw on symbols.

This commit is contained in:
John-David Dalton
2016-01-02 09:31:28 -06:00
parent f7c7dee8b0
commit 849f8e77ec
2 changed files with 20 additions and 2 deletions

View File

@@ -10351,7 +10351,10 @@
if (typeof value == 'string') {
return value;
}
var result = value == null ? '' : (value + '');
if (value == null) {
return '';
}
var result = isSymbol(value) ? symbolToString.call(value) : (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}