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';
|
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') {
|
||||||
|
Reference in New Issue
Block a user