Skip to content

Commit

Permalink
fix: update scope undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Apr 6, 2022
1 parent a825149 commit f8ef4c2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions admin-ui/plugins/auth-server/components/Scopes/ScopeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
result['attributes'].spontaneousClientId =
scope.attributes.spontaneousClientId
result['attributes'].spontaneousClientScopes =
scope.spontaneousClientScopes
scope.spontaneousClientScopes ||
scope.attributes.spontaneousClientScopes
handleSubmit(JSON.stringify(result))
}}
>
Expand Down Expand Up @@ -308,10 +309,16 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
formik={formik}
value={getMapping(
spontaneousClientScopes,
scope.attributes.spontaneousClientScopes.map((item) => ({ dn: item || "", name: item || ""})),
scope?.attributes?.spontaneousClientScopes?.map((item) => ({
dn: item || '',
name: item || '',
})),
)}
allowNew={true}
options={spontaneousClientScopes.map((item) => ({ dn: item || "", name: item || "" }))}
options={spontaneousClientScopes?.map((item) => ({
dn: item || '',
name: item || '',
}))}
doc_category={SCOPE}
/>
</Accordion.Body>
Expand Down

0 comments on commit f8ef4c2

Please sign in to comment.