Unit module fix

This commit is contained in:
thoso 2014-02-20 20:25:50 +01:00
parent c6fdd3bdbc
commit 408707157a

View File

@ -13,11 +13,11 @@ var units = function(dbot) {
'~convert': function(event) { '~convert': function(event) {
var query = event.input[1]; var query = event.input[1];
try { try {
var result = unit.convert(query);
event.reply(dbot.t('result', { event.reply(dbot.t('result', {
'input': query, 'input': query,
'output': result 'output': result
})); }));
var result = unit.convert(query);
} }
catch (e) { catch (e) {
event.reply(dbot.t('error')); event.reply(dbot.t('error'));