Skip to content

Commit 582a522

Browse files
committed
Fix NaN days in recently used languages
1 parent 51b6572 commit 582a522

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/plugins/languages/analyzer/recent.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class RecentAnalyzer extends Analyzer {
9797

9898

9999
this.debug(`fetched ${commits.length} commits`)
100-
this.results.latest = Math.round((new Date().getTime() - new Date(commits.slice(-1).shift()?.created_at).getTime()) / (1000 * 60 * 60 * 24))
100+
this.results.latest = Math.round((new Date().getTime() - new Date(events.slice(-1).shift()?.created_at).getTime()) / (1000 * 60 * 60 * 24))
101101
this.results.commits = commits.length
102102

103103
//Retrieve edited files and filter edited lines (those starting with +/-) from patches

0 commit comments

Comments
 (0)