fixing terms issue (#507)
* Update translate.js fixing e.terms console log error * revert reformats * revert formating
This commit is contained in:
parent
b31d53e539
commit
06678d8c49
|
@ -60,7 +60,7 @@ const sendRequestToGoogle = async (word, sourceLang, targetLang) => {
|
|||
resultData.resultText = result.data.sentences.map(sentence => sentence.trans).join("");
|
||||
if (result.data.dict) {
|
||||
resultData.candidateText = result.data.dict
|
||||
.map(dict => `${dict.pos}${dict.pos != "" ? ": " : ""}${dict.terms.join(", ")}\n`)
|
||||
.map(dict => `${dict.pos}${dict.pos != "" ? ": " : ""}${dict.terms !== undefined?dict.terms.join(", "):""}\n`)
|
||||
.join("");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue