fix: oops, don't return null from representationByLanguage (#5301)

This commit is contained in:
ggurdin 2026-01-21 09:16:55 -05:00 committed by GitHub
parent 8bf00b0f24
commit 8a2f4747c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,