From 5d8e513d45e4764189b3b7516e5b9f29e6a6f38e Mon Sep 17 00:00:00 2001 From: Dingedi <64697405+dingedi@users.noreply.github.com> Date: Sat, 1 Oct 2022 17:12:05 +0200 Subject: [PATCH] fix --- app/static/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index 4e25f57..e2bd42f 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -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{