1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00
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{