1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

Minor renaming fix

This commit is contained in:
Tim Daubenschütz 2015-09-25 15:25:34 +02:00
parent cb452ce7bf
commit 5e98787288

View File

@ -215,10 +215,10 @@ export function excludePropFromObject(obj, propList){
* @return {string} The truncated text
*/
export function truncateTextAtCharIndex(text, charIndex, replacement = '...') {
let wrappedText = '';
let truncatedText = '';
wrappedText = text.slice(0, charIndex);
wrappedText += text.length > charIndex ? replacement : '';
truncatedText = text.slice(0, charIndex);
truncatedText += text.length > charIndex ? replacement : '';
return wrappedText;
return truncatedText;
}