diff --git a/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js index 43907c7b49..f914aa2b78 100644 --- a/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js +++ b/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js @@ -78,6 +78,9 @@ const detectedLanguage = createSelector([ ], text => { if (text.length > 20) { const guesses = debouncedLande(text); + if (!guesses) + return ''; + const [lang, confidence] = guesses[0]; if (confidence > 0.8) {