diff --git a/simple-translate/translate.js b/simple-translate/translate.js index ae42b6a..8900bd2 100644 --- a/simple-translate/translate.js +++ b/simple-translate/translate.js @@ -11,6 +11,8 @@ class Translate { } async translate(sourceWord, sourceLang = "auto", targetLang) { + sourceWord = sourceWord.trim(); + const result = await this.sendRequest(sourceWord, sourceLang, targetLang); return this.formatResult(result); }