Skip to content

Commit 0142693

Browse files
author
Peter Bengtsson
authored
commit.author can be null (#89)
* commit.author can be null Fixes #86 * correct key
1 parent 249a1d1 commit 0142693

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/DeployPage.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ class DeployTable extends React.Component {
288288
}
289289
}
290290

291-
if (commit.author.login === BORS_LOGIN && commit.author.type === 'Bot') {
291+
if (
292+
commit.author &&
293+
commit.author.login === BORS_LOGIN &&
294+
commit.author.type === 'Bot'
295+
) {
292296
hasBors = true;
293297
} else if (borsMode) {
294298
continue;
@@ -430,7 +434,10 @@ class CommitDetails extends React.Component {
430434
render() {
431435
let { commit, author, tag, html_url, borsMode, owner, repo } = this.props;
432436

433-
let involvedUsers = [author];
437+
let involvedUsers = [];
438+
if (author) {
439+
involvedUsers.push(author);
440+
}
434441

435442
let title;
436443
if (borsMode && author.login === BORS_LOGIN && author.type === 'Bot') {
@@ -656,7 +663,7 @@ class Culprits extends React.PureComponent {
656663
<span className="on-prefix">On</span> {group.name}
657664
</h4>
658665
{group.users.map(([role, user]) => (
659-
<div key={`${role}:${user}`} className="media">
666+
<div key={`${role}:${user.login}`} className="media">
660667
<a href={user.html_url}>
661668
<img
662669
src={user.avatar_url}

0 commit comments

Comments
 (0)