Skip to content

Commit 18178ec

Browse files
committed
add null aware to prevent errors
1 parent 6d02228 commit 18178ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/common/model/pulls.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ class PullRequest extends PullRequestInformation {
136136
pr.deletionsCount = input['deletions'];
137137
pr.changedFilesCount = input['changed_files'];
138138
pr.labels = input['labels']
139-
.cast<Map<String, dynamic>>()
140-
.map<IssueLabel>(IssueLabel.fromJSON)
141-
.toList();
139+
?.cast<Map<String, dynamic>>()
140+
?.map<IssueLabel>(IssueLabel.fromJSON)
141+
?.toList();
142142
return pr;
143143
}
144144
}

0 commit comments

Comments
 (0)