This commit is contained in:
Dingedi 2022-10-01 17:12:05 +02:00 committed by GitHub
parent 7c37681afc
commit 5d8e513d45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function(){
self.translatedText = res.translatedText;
self.loadingTranslation = false;
self.output = JSON.stringify(res, null, 4);
if(self.sourceLang == "auto" && res.detectedLanguage.length > 0){
if(self.sourceLang == "auto" && res.detectedLanguage !== undefined){
self.detectedLangText = res.detectedLanguage.language+" ("+res.detectedLanguage.confidence+"%)";
}
} else{