Skip to content

Commit

Permalink
fix: commit without related user
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Sep 3, 2019
1 parent 85e02e8 commit b2b6ef4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/screens/commits.dart
Expand Up @@ -33,6 +33,7 @@ class CommitsScreen extends StatelessWidget {
messageHeadline
committedDate
author {
name
email
avatarUrl
user {
Expand Down Expand Up @@ -82,7 +83,10 @@ class CommitsScreen extends StatelessWidget {
SizedBox(height: 4),
Row(
children: <Widget>[
Text(payload['author']['user']['login'],
Text(
payload['author']['user'] == null
? payload['author']['name']
: payload['author']['user']['login'],
style: TextStyle(
fontWeight: FontWeight.w500, fontSize: 14)),
Text(
Expand Down

0 comments on commit b2b6ef4

Please sign in to comment.