From bc077bdad72ceb194d9ba43d219ff1bb5cdc5933 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 15 Jan 2026 01:22:46 +0100 Subject: [PATCH] Prevent potential TypeError "sourcesByLanguage" can be empty while the sources are still loading --- src/features/source/components/SourceLanguageSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/source/components/SourceLanguageSelect.tsx b/src/features/source/components/SourceLanguageSelect.tsx index ef740641..25388035 100644 --- a/src/features/source/components/SourceLanguageSelect.tsx +++ b/src/features/source/components/SourceLanguageSelect.tsx @@ -87,7 +87,7 @@ export const SourceLanguageSelect = ({ return 0; } - return sourcesByLanguage[language].length ?? 0; + return sourcesByLanguage[language]?.length ?? 0; }), [sourcesByLanguage, languagesSortedBySelectState], );