Skip to content

Commit a304322

Browse files
committed
fix: handle commits without committer property in recently-used analyzer
Prevents TypeError when payload.commits contains commit objects without committer. Checks commit and commit.committer exist before accessing email property.
1 parent 366f8b9 commit a304322

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
@@ -67,7 +67,7 @@ export class RecentAnalyzer extends Analyzer {
6767
...await Promise.allSettled(
6868
commits
6969
.flatMap(({payload}) => payload.commits)
70-
.filter(({committer}) => filters.text(committer?.email, this.authoring, {debug: false}))
70+
.filter(commit => commit?.committer && filters.text(commit.committer?.email, this.authoring, {debug: false}))
7171
.map(commit => commit.url)
7272
.map(async commit => (await this.rest.request(commit)).data),
7373
),

0 commit comments

Comments
 (0)