Skip to content

Commit

Permalink
Merge pull request #1209 from GetStream/fix/null-map-values
Browse files Browse the repository at this point in the history
fix(llc): handle user extra data name null condition
  • Loading branch information
imtoori authored Jun 20, 2022
2 parents ee0aa1a + 58f4cee commit 7732953
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 7732953

Please sign in to comment.