diff --git a/lib/service/yandex.js b/lib/service/yandex.js index 6760b4c..80fde99 100644 --- a/lib/service/yandex.js +++ b/lib/service/yandex.js @@ -16,6 +16,11 @@ function translateString(language, key, destObj) { return new Promise(function (resolve, reject) { var valuesStr = valuesArray.join(hashSimple); + if (valuesStr === ''){ + // there is nothing to translate, so don't ask Yandex (Yandex will respond with an error) + resolve(destObj); + return; + } translateService.translate(valuesStr, {to: language}, function (err, res) { if (err || !res) { reject('Yandex translation service failed', err);