Skip to content

Commit b575e91

Browse files
author
Julius-Rapp
authored
docs: fix user.id access in case user is null (#1056)
1 parent 8980223 commit b575e91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/pages/docs/guides/queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const { data: user } = useQuery(['user', email], getUserByEmail)
200200

201201
// Then get the user's projects
202202
const { isIdle, data: projects } = useQuery(
203-
['projects', user.id],
203+
['projects', user?.id],
204204
getProjectsByUser,
205205
{
206206
// `user` would be `null` at first (falsy),

0 commit comments

Comments
 (0)