Skip to content

Commit

Permalink
fix nullcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Nov 14, 2024
1 parent 0b2f8e0 commit e767cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AuthContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
if (response) {
const { account } = response;
if (account) {
const [lastName, firstName] = accounts[0].name?.split(',')! || [];
const [lastName, firstName] = accounts[0]?.name?.split(',')! || [];
setUserData({
email: account.username,
name: `${firstName} ${lastName}`,
Expand Down

0 comments on commit e767cba

Please sign in to comment.