We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44869ab commit bb70b9aCopy full SHA for bb70b9a
site/src/components/OrganizationAutocomplete/OrganizationAutocomplete.tsx
@@ -73,8 +73,10 @@ export const OrganizationAutocomplete: FC<OrganizationAutocompleteProps> = ({
73
// If an authorization check was provided, filter the organizations based on
74
// the results of that check.
75
let options = organizationsQuery.data ?? [];
76
- if (check && permissionsQuery.data) {
77
- options = options.filter((org) => permissionsQuery.data[org.id]);
+ if (check) {
+ options = permissionsQuery.data
78
+ ? options.filter((org) => permissionsQuery.data[org.id])
79
+ : [];
80
}
81
82
return (
0 commit comments