Do not convert empty object acr.loa.map to array (#3282)

This commit is contained in:
Erik Jan de Wit 2022-09-06 18:52:57 +02:00 committed by GitHub
parent 29cf962f19
commit f5282fbc75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {