File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ function calculateRank({
6565
6666 const level = ( ( ) => {
6767 if ( normalizedScore < RANK_S_VALUE ) return "S+" ;
68- if ( normalizedScore >= RANK_S_VALUE && normalizedScore < RANK_DOUBLE_A_VALUE ) return "S" ;
69- if ( normalizedScore >= RANK_DOUBLE_A_VALUE && normalizedScore < RANK_A2_VALUE ) return "A++" ;
70- if ( normalizedScore >= RANK_A2_VALUE && normalizedScore < RANK_A3_VALUE ) return "A+"
71- if ( normalizedScore >= RANK_A3_VALUE && normalizedScore < RANK_B_VALUE ) return "B+"
68+ if ( normalizedScore < RANK_DOUBLE_A_VALUE ) return "S" ;
69+ if ( normalizedScore < RANK_A2_VALUE ) return "A++" ;
70+ if ( normalizedScore < RANK_A3_VALUE ) return "A+"
71+ return "B+" ;
7272 } ) ( )
7373
7474 return { level, score : normalizedScore } ;
Original file line number Diff line number Diff line change @@ -86,15 +86,16 @@ const totalCommitsFetcher = async (username) => {
8686
8787 try {
8888 let res = await retryer ( fetchTotalCommits , { login : username } ) ;
89- if ( res . data . total_count ) {
89+ let total_count = res . data . total_count ;
90+ if ( ! ! total_count && ! isNaN ( total_count ) ) {
9091 return res . data . total_count ;
9192 }
9293 } catch ( err ) {
9394 logger . log ( err ) ;
94- // just return 0 if there is something wrong so that
95- // we don't break the whole app
96- return 0 ;
9795 }
96+ // just return 0 if there is something wrong so that
97+ // we don't break the whole app
98+ return 0 ;
9899} ;
99100
100101/**
You can’t perform that action at this time.
0 commit comments