Ensure _.truncate doesn't truncate strings if they are equal to the given length.

This commit is contained in:
John-David Dalton
2014-03-10 01:11:08 -07:00
parent 4eaf91c3dc
commit 05dce760d6
5 changed files with 5 additions and 5 deletions

View File

@@ -7562,7 +7562,7 @@
length = +options || 0;
}
string = string == null ? '' : String(string);
if (length > string.length) {
if (length >= string.length) {
return string;
}
var end = length - omission.length;