hot fix test for function first

This commit is contained in:
Berkeley Martinez
2015-08-16 15:26:43 -07:00
parent a0c9906e69
commit a228e61353

View File

@ -24,9 +24,11 @@ export default function prodErrorHandler() {
var message = 'opps! Something went wrong. Please try again later'; var message = 'opps! Something went wrong. Please try again later';
if (type === 'html') { if (type === 'html') {
req.flash('errors', { if (typeof req.flash === 'function') {
msg: message req.flash('errors', {
}); msg: message
});
}
return res.redirect('/'); return res.redirect('/');
// json // json
} else if (type === 'json') { } else if (type === 'json') {