fix: oops, don't return null from representationByLanguage (#5301)
This commit is contained in:
parent
8bf00b0f24
commit
8a2f4747c9
1 changed files with 6 additions and 8 deletions
|
|
@ -294,14 +294,12 @@ class PangeaMessageEvent {
|
|||
RepresentationEvent? representationByLanguage(
|
||||
String langCode, {
|
||||
bool Function(RepresentationEvent)? filter,
|
||||
}) {
|
||||
representations.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.langCode.split("-")[0] == langCode.split("-")[0] &&
|
||||
(filter?.call(element) ?? true),
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}) =>
|
||||
representations.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.langCode.split("-")[0] == langCode.split("-")[0] &&
|
||||
(filter?.call(element) ?? true),
|
||||
);
|
||||
|
||||
Event? getTextToSpeechLocal(
|
||||
String langCode,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue