Do not convert empty object acr.loa.map to array (#3282)
This commit is contained in:
parent
29cf962f19
commit
f5282fbc75
1 changed files with 1 additions and 2 deletions
|
@ -200,14 +200,13 @@ export const RealmSettingsTabs = ({
|
||||||
r.attributes?.["acr.loa.map"] &&
|
r.attributes?.["acr.loa.map"] &&
|
||||||
typeof r.attributes["acr.loa.map"] !== "string"
|
typeof r.attributes["acr.loa.map"] !== "string"
|
||||||
) {
|
) {
|
||||||
const map = JSON.stringify(
|
r.attributes["acr.loa.map"] = JSON.stringify(
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
(r.attributes["acr.loa.map"] as KeyValueType[])
|
(r.attributes["acr.loa.map"] as KeyValueType[])
|
||||||
.filter(({ key }) => key !== "")
|
.filter(({ key }) => key !== "")
|
||||||
.map(({ key, value }) => [key, value])
|
.map(({ key, value }) => [key, value])
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
r.attributes["acr.loa.map"] = map !== "{}" ? map : "[]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue