Prevent potential TypeError

Potential fix for #975
This commit is contained in:
schroda
2025-06-23 23:51:07 +02:00
parent b94ad4ba06
commit 09b5f7e558

View File

@@ -120,7 +120,7 @@ export const SourceLanguageSelect = ({
increaseViewportBy={400}
computeItemKey={(index) => languagesSortedBySelectState[index]}
itemContent={(_index, language) => {
const sourcesOfLanguage = sourcesByLanguage[language];
const sourcesOfLanguage = sourcesByLanguage[language] ?? [];
const isEnabled = tmpSelectedLanguages.includes(language);
return (