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,15 +182,18 @@ 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 <DropdownItem
key="fedSync" key="fedSync"
onClick={() => sync("fedToKeycloak")} onClick={() => sync("fedToKeycloak")}
> >
{t("syncLDAPGroupsToKeycloak")} {t("syncLDAPGroupsToKeycloak")}
</DropdownItem> </DropdownItem>,
), ]
mapper?.metadata.keycloakToFedSyncSupported && ( : []),
...(mapper?.metadata.keycloakToFedSyncSupported
? [
<DropdownItem <DropdownItem
key="ldapSync" key="ldapSync"
onClick={() => { onClick={() => {
@ -198,8 +201,9 @@ export default function LdapMapperDetails() {
}} }}
> >
{t("syncKeycloakGroupsToLDAP")} {t("syncKeycloakGroupsToLDAP")}
</DropdownItem> </DropdownItem>,
), ]
: []),
] ]
} }
/> />