File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " git-stats" ,
3- "version" : " 2.9.2 " ,
3+ "version" : " 2.9.3 " ,
44 "description" : " Local git statistics including GitHub-like contributions calendars." ,
55 "main" : " lib/index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change @@ -20,13 +20,11 @@ function migrate() {
2020 Logger . log ( e ) ;
2121 }
2222
23- if ( data . commits ) {
24- return ;
25- }
26-
27- var newStats = { commits : { } } ;
23+ data . commits = data . commits || { } ;
24+ var newStats = { commits : data . commits } ;
25+ delete data . commits ;
2826 Object . keys ( data ) . forEach ( function ( day ) {
29- var cDay = newStats . commits [ day ] = { } ;
27+ var cDay = newStats . commits [ day ] = newStats . commits [ day ] || { } ;
3028 Object . keys ( data [ day ] ) . map ( function ( c ) {
3129 Object . keys ( data [ day ] [ c ] ) . map ( function ( h ) {
3230 cDay [ h ] = 1 ;
@@ -38,3 +36,4 @@ function migrate() {
3836}
3937
4038migrate ( ) ;
39+
You can’t perform that action at this time.
0 commit comments