diff --git a/public/src/modules/translator.js b/public/src/modules/translator.js index 00a57183ef..a031efdd0f 100644 --- a/public/src/modules/translator.js +++ b/public/src/modules/translator.js @@ -291,6 +291,10 @@ lang = null; } + if (!(typeof text === 'string' || text instanceof String) || text === '') { + return cb(''); + } + Translator.create(lang).translate(text).then(function (output) { return cb(output); }).catch(function (err) {