dont translate non strings

v1.18.x
barisusakli 8 years ago
parent d7c559a209
commit e69ff93a49

@ -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) {

Loading…
Cancel
Save