SyntaxFix
Write A Post
Hire A Developer
Questions
Just another suggestion, removing any trailing white-space
limitStrLength = (text, max_length) => { if(text.length > max_length - 3){ return text.substring(0, max_length).trimEnd() + "..." } else{ return text }