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

Update BlogLayout.js #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update BlogLayout.js #107

wants to merge 1 commit into from

Conversation

mantzuri
Copy link

Add optional to currentUser.email
This will prevent the application from throwing an error when there is no entries in the DB

Add optional to `currentUser.email`
This will prevent the application from throwing an error when there is no entries in the DB
@cannikin
Copy link
Member

Did you actually get see an error at this point in the code? This is behind the isAuthenticated check, so it should only be displayed if a user was logged in, and you can only log in if there's a user in the database...or maybe I missed something and this is displayed somehow?

@cannikin
Copy link
Member

There are some places in the tutorial where an error is thrown "on purpose" to show users why it happens and how to fix it. Does the text of the tutorial depend on currentUser not being optional in order to demonstrate something? Fixing this could make that surrounding text confusing if an expected error doesn't occur!

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

Successfully merging this pull request may close these issues.

2 participants