Skip to content

Commit b35d696

Browse files
committed
Display fallback string when the session object is not available
1 parent 15fe712 commit b35d696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export default function Home() {
181181
</p>
182182
{status === 'authenticated' ? (
183183
<div className='welcome__user'>
184-
<h2>Welcome, {session.user.name}!</h2>
184+
<h2>Welcome, {session?.user?.name || 'mapper'}!</h2>
185185
<ul className='welcome__user--actions'>
186186
<li>
187187
<a href={join(APP_URL, '/teams/create')}>Create New Team</a>

0 commit comments

Comments
 (0)