diff --git a/packages/dart_client/lib/src/models/channel_model.dart b/packages/dart_client/lib/src/models/channel_model.dart index ff9d04a8..046e29c5 100644 --- a/packages/dart_client/lib/src/models/channel_model.dart +++ b/packages/dart_client/lib/src/models/channel_model.dart @@ -146,7 +146,7 @@ class ChannelModel { /// Returns a new [ChannelModel] that is a combination of this channelModel and the given /// [other] channelModel. ChannelModel merge(ChannelModel other) { - if (other == null) return null; + if (other == null) return this; return copyWith( id: other.id, type: other.type, diff --git a/packages/dart_client/lib/src/models/message.dart b/packages/dart_client/lib/src/models/message.dart index 2acbea29..e23eb51a 100644 --- a/packages/dart_client/lib/src/models/message.dart +++ b/packages/dart_client/lib/src/models/message.dart @@ -254,7 +254,7 @@ class Message { /// Returns a new [Message] that is a combination of this message and the given /// [other] message. Message merge(Message other) { - if (other == null) return null; + if (other == null) return this; return copyWith( id: other.id, text: other.text,