redwoodjs / redwood-tutorial

The end state after completing the RedwoodJS introduction tutorial
https://redwoodjs.com/tutorial
40 stars 109 forks source link

Error in BlogLayout #117

Open Reoge opened 5 days ago

Reoge commented 5 days ago

I get next error opening home page after "yarn rw dev"

image

Steps to replicate:

  1. do all preparation steps from tutorial
  2. start project (do not change any line in the project)
  3. open home page

The problem appears in Firefox and Google Chrome browsers

The reason the problem happens:

  1. there are several calls to BlogLayout component (5 overall)
  2. useAuth returns at the first call: isAuthenticated - false, currentUser - null. After that: isAuthenticated - true, currentUser - undefined

I tracked down the problem to this line. Replacing throw error to empty object fix the problem