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';
if (type === 'html') {
req.flash('errors', {
msg: message
});
if (typeof req.flash === 'function') {
req.flash('errors', {
msg: message
});
}
return res.redirect('/');
// json
} else if (type === 'json') {