Skip to content

Commit bb70b9a

Browse files
committed
🧼
1 parent 44869ab commit bb70b9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

site/src/components/OrganizationAutocomplete/OrganizationAutocomplete.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ export const OrganizationAutocomplete: FC<OrganizationAutocompleteProps> = ({
7373
// If an authorization check was provided, filter the organizations based on
7474
// the results of that check.
7575
let options = organizationsQuery.data ?? [];
76-
if (check && permissionsQuery.data) {
77-
options = options.filter((org) => permissionsQuery.data[org.id]);
76+
if (check) {
77+
options = permissionsQuery.data
78+
? options.filter((org) => permissionsQuery.data[org.id])
79+
: [];
7880
}
7981

8082
return (

0 commit comments

Comments
 (0)