Skip to content

Commit

Permalink
Add optional to response check in case it is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-cannon committed Jan 18, 2025
1 parent 38c58b2 commit f773f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const getUserAction = async () => {

const response = await serverFetch('/api/user');

return response.json();
return response?.json();
}

0 comments on commit f773f6b

Please sign in to comment.