Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click twice on sign up button for flash message to appear. #8

Open
qudlaty opened this issue Jan 23, 2020 · 2 comments
Open

Click twice on sign up button for flash message to appear. #8

qudlaty opened this issue Jan 23, 2020 · 2 comments

Comments

@qudlaty
Copy link

qudlaty commented Jan 23, 2020

YelpCamp routes/index.js line 22 change needed from:
req.flash("error", err.message);
return res.render("register");
to:
return res.render("register", {"error": err.message});
or:
req.flash("error", err.message);
return res.redirect("register");

@sachincpu
Copy link

Does anyone know how to handle this error?

@Benson-dev
Copy link

Thank you, this fixed the error for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants