empty array instead of null (#20104)

fixes: #20068
This commit is contained in:
Erik Jan de Wit 2023-05-11 18:20:11 +02:00 committed by GitHub
parent a2bdfab9c5
commit 92f26b9f7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,24 +182,28 @@ export default function LdapMapperDetails() {
<DropdownItem key="delete" onClick={toggleDeleteDialog}>
{t("common:delete")}
</DropdownItem>,
mapper?.metadata.fedToKeycloakSyncSupported && (
<DropdownItem
key="fedSync"
onClick={() => sync("fedToKeycloak")}
>
{t("syncLDAPGroupsToKeycloak")}
</DropdownItem>
),
mapper?.metadata.keycloakToFedSyncSupported && (
<DropdownItem
key="ldapSync"
onClick={() => {
sync("keycloakToFed");
}}
>
{t("syncKeycloakGroupsToLDAP")}
</DropdownItem>
),
...(mapper?.metadata.fedToKeycloakSyncSupported
? [
<DropdownItem
key="fedSync"
onClick={() => sync("fedToKeycloak")}
>
{t("syncLDAPGroupsToKeycloak")}
</DropdownItem>,
]
: []),
...(mapper?.metadata.keycloakToFedSyncSupported
? [
<DropdownItem
key="ldapSync"
onClick={() => {
sync("keycloakToFed");
}}
>
{t("syncKeycloakGroupsToLDAP")}
</DropdownItem>,
]
: []),
]
}
/>