Skip to content

Commit

Permalink
Add optional chaining to hasLinkQueryParams
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrady8800 committed Mar 13, 2024
1 parent 10b72dd commit 056cdfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/src/models/config/guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const hasNoActiveFactor = (context: AuthContext<any>) =>
// If so, we need to check if a second factor is required to log in.
export const hasLinkQueryParams = (context: AuthContext<any>) => {
// TODO better off in userfront-core?
return !!(context.query.token && context.query.uuid);
return !!(context.query?.token && context.query?.uuid);
};

export const isLoggedIn = () => {
Expand Down

0 comments on commit 056cdfa

Please sign in to comment.