Skip to content

Commit

Permalink
fix: conditional check for auth.active property
Browse files Browse the repository at this point in the history
Adjusted the conditional check to use optional chaining for auth.active property. This change ensures safer access to the property.
  • Loading branch information
schettn committed Mar 11, 2024
1 parent 316133d commit ffa23ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const service = defineService(
user?: User;
} = c;

if (auth.active) {
if (auth?.active) {
const organizationId = auth[
"urn:zitadel:iam:user:resourceowner:id"
] as string;
Expand Down

0 comments on commit ffa23ab

Please sign in to comment.