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}> <DropdownItem key="delete" onClick={toggleDeleteDialog}>
{t("common:delete")} {t("common:delete")}
</DropdownItem>, </DropdownItem>,
mapper?.metadata.fedToKeycloakSyncSupported && ( ...(mapper?.metadata.fedToKeycloakSyncSupported
<DropdownItem ? [
key="fedSync" <DropdownItem
onClick={() => sync("fedToKeycloak")} key="fedSync"
> onClick={() => sync("fedToKeycloak")}
{t("syncLDAPGroupsToKeycloak")} >
</DropdownItem> {t("syncLDAPGroupsToKeycloak")}
), </DropdownItem>,
mapper?.metadata.keycloakToFedSyncSupported && ( ]
<DropdownItem : []),
key="ldapSync" ...(mapper?.metadata.keycloakToFedSyncSupported
onClick={() => { ? [
sync("keycloakToFed"); <DropdownItem
}} key="ldapSync"
> onClick={() => {
{t("syncKeycloakGroupsToLDAP")} sync("keycloakToFed");
</DropdownItem> }}
), >
{t("syncKeycloakGroupsToLDAP")}
</DropdownItem>,
]
: []),
] ]
} }
/> />