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"] &&
|
||||
typeof r.attributes["acr.loa.map"] !== "string"
|
||||
) {
|
||||
const map = JSON.stringify(
|
||||
r.attributes["acr.loa.map"] = JSON.stringify(
|
||||
Object.fromEntries(
|
||||
(r.attributes["acr.loa.map"] as KeyValueType[])
|
||||
.filter(({ key }) => key !== "")
|
||||
.map(({ key, value }) => [key, value])
|
||||
)
|
||||
);
|
||||
r.attributes["acr.loa.map"] = map !== "{}" ? map : "[]";
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue