Merge commit '14bb6bb29a
' into kb_migration
This commit is contained in:
commit
5b8ca44e3d
20 changed files with 726 additions and 169 deletions
|
@ -168,8 +168,9 @@ const makeMapStateToProps = () => {
|
|||
};
|
||||
|
||||
const truncate = (str, num) => {
|
||||
if (str.length > num) {
|
||||
return str.slice(0, num) + '…';
|
||||
const arr = Array.from(str);
|
||||
if (arr.length > num) {
|
||||
return arr.slice(0, num).join('') + '…';
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue