Skip to content

Commit 2b0050c

Browse files
committed
Add comment to clarify
1 parent 4d96056 commit 2b0050c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ const AsyncRoleSelect = (field: ReturnType<typeof useFormControl<'role'>>) => {
199199
return;
200200
}
201201

202+
// Skip if the default role from org settings is not in the current role set
203+
// This will eventually be returned by the roles endpoint, and `organizationSettings.domains.defaultRole` will be deprecated
202204
const defaultRoleExists = options?.some(option => option.value === defaultRole);
203205
if (!defaultRoleExists) {
204206
return;

0 commit comments

Comments
 (0)