Skip to content

Commit

Permalink
fix: handle user extra data name null condition
Browse files Browse the repository at this point in the history
  • Loading branch information
HayesGordon committed Jun 15, 2022
1 parent 1360aea commit 58f4cee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/stream_chat/lib/src/core/models/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class User extends Equatable {
/// {@macro name}
@JsonKey(ignore: true)
String get name {
if (extraData.containsKey('name')) {
if (extraData.containsKey('name') && extraData['name'] != null) {
final name = extraData['name']! as String;
if (name.isNotEmpty) return name;
}
Expand Down

0 comments on commit 58f4cee

Please sign in to comment.