Fix detectedSource not returned from API sometimes

This commit is contained in:
Lim Chee Aun 2023-04-25 11:27:11 +08:00
parent 2b4efc6f04
commit 48c86d7090

View file

@ -43,7 +43,7 @@ function TranslationBlock({
return {
provider: 'lingva',
content: res.translation,
detectedSourceLanguage: res.info.detectedSource,
detectedSourceLanguage: res.info?.detectedSource,
info: res.info,
};
});