@@ -18,7 +18,7 @@ import {
18
18
extractSocialNetworks ,
19
19
getUserFavicon ,
20
20
} from '@utils/user-mapping' ;
21
- import { get , map , chunk , first , orderBy , union , size , includes , isEmpty } from 'lodash' ;
21
+ import { get , map , chunk , first , orderBy , union , size , includes , isEmpty , truncate } from 'lodash' ;
22
22
import { updateUser , upsertUser } from '@services/user' ;
23
23
import {
24
24
GITHUB_API_URL ,
@@ -229,7 +229,10 @@ const getDevcoverUser = async (username, baseUser = {}, userBioArray = [], isPre
229
229
user . username = toLowerCase ( username ) ;
230
230
user . ga = get ( userData , 'ga' , null ) ;
231
231
user . repos = selectFirstWithValue ( get ( userData , 'repos' ) , get ( user , 'github.repos' , [ ] ) ) ;
232
- user . shortBio = get ( userData , 'shortBio' , getStringByCriteria ( userBioArray , 'shortest' ) ) || '' ;
232
+ user . shortBio =
233
+ truncate ( get ( userData , 'shortBio' , getStringByCriteria ( userBioArray , 'shortest' ) ) , {
234
+ length : 120 ,
235
+ } ) || '' ;
233
236
user . largeBio = get ( userData , 'largeBio' , getStringByCriteria ( userBioArray ) ) || '' ;
234
237
user . hasGithub = isPreview
235
238
? get ( userData , 'hasGithub' , false )
0 commit comments