Fix WebUI crash when language detection code returns `undefined` (#33683)

pull/33695/head
Claire 1 month ago committed by GitHub
parent 607f65a0a5
commit 8dcfd3f246
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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) {

Loading…
Cancel
Save