Skip to content

Commit

Permalink
fix: error thrown when no emotes are rendered (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 authored Dec 17, 2022
1 parent 9793dd3 commit 87eccaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/models/messages/twitch/subscription_message_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class TwitchSubscriptionMessageEventModel extends MessageModel {
: super(messageId: messageId, timestamp: timestamp);

String emotesToString() {
if (emotes.isEmpty) {
return "";
}
return emotes
.map((e) => '${e.id}:${e.begin}-${e.end}')
.reduce((value, element) => '$value/$element');
Expand Down

0 comments on commit 87eccaf

Please sign in to comment.