some migrations have empty name (#34288)

fixes: #33309

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-10-29 12:13:48 +01:00 committed by GitHub
parent 65f4ea9c8c
commit b47a8b3f05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,7 @@ type DataType = RequiredActionProviderRepresentation &
};
type Row = {
name: string;
name?: string;
enabled: boolean;
defaultAction: boolean;
data: DataType;
@ -173,14 +173,14 @@ export const RequiredActions = () => {
displayKey: "enabled",
cellRenderer: (row) => (
<Switch
id={`enable-${toKey(row.name)}`}
id={`enable-${toKey(row.name || "")}`}
label={t("on")}
labelOff={t("off")}
isChecked={row.enabled}
onChange={() => {
updateAction(row.data, "enabled");
}}
aria-label={toKey(row.name)}
aria-label={row.name}
/>
),
width: 20,
@ -191,7 +191,7 @@ export const RequiredActions = () => {
thTooltipText: "authDefaultActionTooltip",
cellRenderer: (row) => (
<Switch
id={`default-${toKey(row.name)}`}
id={`default-${toKey(row.name || "")}`}
label={t("on")}
isDisabled={!row.enabled}
labelOff={!row.enabled ? t("disabledOff") : t("off")}
@ -199,7 +199,7 @@ export const RequiredActions = () => {
onChange={() => {
updateAction(row.data, "defaultAction");
}}
aria-label={toKey(row.name)}
aria-label={row.name}
/>
),
width: 20,