fix: commit without related user

This commit is contained in:
Rongjian Zhang 2019-09-03 14:32:17 +08:00
parent 85e02e84a6
commit b2b6ef4795
1 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@ class CommitsScreen extends StatelessWidget {
messageHeadline
committedDate
author {
name
email
avatarUrl
user {
@ -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(