hot fix test for function first
This commit is contained in:
@ -24,9 +24,11 @@ export default function prodErrorHandler() {
|
||||
|
||||
var message = 'opps! Something went wrong. Please try again later';
|
||||
if (type === 'html') {
|
||||
if (typeof req.flash === 'function') {
|
||||
req.flash('errors', {
|
||||
msg: message
|
||||
});
|
||||
}
|
||||
return res.redirect('/');
|
||||
// json
|
||||
} else if (type === 'json') {
|
||||
|
Reference in New Issue
Block a user