Fixed a typo in string truncation util

This commit is contained in:
Brian Vaughn
2019-06-02 10:06:05 -07:00
parent 17b04c321c
commit dc945f6b81
+1 -1
View File
@@ -177,7 +177,7 @@ export function truncateText(text: string, maxLength: number): string {
return (
text.substr(0, Math.floor(maxLength / 2)) +
'…' +
text.substr(length - Math.ceil(maxLength / 2) + 1)
text.substr(length - Math.ceil(maxLength / 2) - 1)
);
} else {
return text;