File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -560,15 +560,16 @@ class GitStats {
560560 ;
561561
562562 self . authors ( options , function ( err , authors ) {
563+ const maxAuthors = 2 * options . radius ;
563564 if ( err ) { return callback ( err ) ; }
564- if ( authors . length > 50 ) {
565+ if ( authors . length > maxAuthors ) {
565566 let others = {
566- value : authors . slice ( 50 ) . reduce ( function ( a , b ) {
567+ value : authors . slice ( maxAuthors ) . reduce ( function ( a , b ) {
567568 return a + b . value ;
568569 } , 0 )
569570 , label : "Others"
570571 } ;
571- authors = authors . slice ( 0 , 50 ) ;
572+ authors = authors . slice ( 0 , maxAuthors ) ;
572573 authors . push ( others ) ;
573574 }
574575
Original file line number Diff line number Diff line change 1414 "contributors" : [
1515 " Gnab <as0n@gnab.fr>" ,
1616 " William Boman <william@redwill.se>" ,
17- " Fabian Furger <mystyfly@gmail.com>"
17+ " Fabian Furger <mystyfly@gmail.com>" ,
18+ " Jonah Lawrence <jonah@freshidea.com>"
1819 ],
1920 "license" : " MIT" ,
2021 "repository" : {
You can’t perform that action at this time.
0 commit comments