You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples show that this if (message) { is the proper way to check if a message is there, actually this will be true every time, even if no message is set. It seems to work with:
if(message.length!==0){
I am not sure, but it seems that message, when empty is an empty object ({}) so checking for it will be true in any case.
The text was updated successfully, but these errors were encountered:
This way I can just use req.flash() in my render function and every view will check for the existence of the 3 types of error messages I might or might not have flashed at some point in the process.
The examples show that this
if (message) {
is the proper way to check if a message is there, actually this will be true every time, even if no message is set. It seems to work with:I am not sure, but it seems that message, when empty is an empty object (
{}
) so checking for it will be true in any case.The text was updated successfully, but these errors were encountered: