I set a flash value as:
req.flash('error', 'Invalid email or password');
but when i accessing this in appropriate section with console.log, the results are different:
console.log(req.flash('error')); //output: ['Invalid email or password']
console.log(req.flash('error')); // output: []
what is reason? why it is returning different result?
I set a flash value as:
req.flash('error', 'Invalid email or password');
but when i accessing this in appropriate section with console.log, the results are different:
console.log(req.flash('error')); //output: ['Invalid email or password']
console.log(req.flash('error')); // output: []
what is reason? why it is returning different result?