File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
134
134
// keeping the existing type intact
135
135
. then ( ( [ ssoConfigListRes , authorizationGlobalConfig ] : any ) => {
136
136
let ssoConfig = ssoConfigListRes . result ?. find ( ( sso ) => sso . active )
137
- if ( ssoConfigListRes . result && ssoConfig ) {
137
+ if ( ssoConfig ) {
138
138
this . setState ( { sso : ssoConfig ?. name , lastActiveSSO : ssoConfig } )
139
139
} else {
140
140
ssoConfig = sample [ 'google' ]
@@ -262,7 +262,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
262
262
: { }
263
263
264
264
_getSSOCreateOrUpdatePayload = ( configJSON ) => ( {
265
- id : this . state . ssoConfig ? .id ,
265
+ id : this . state . ssoConfig . id ,
266
266
name : this . state . sso ,
267
267
url : this . state . ssoConfig . url ,
268
268
config : {
@@ -281,8 +281,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
281
281
_validateYaml = ( ) => {
282
282
let configJSON : any = { }
283
283
try {
284
- configJSON = yamlJsParser . parse ( this . state . ssoConfig . config . config )
285
- configJSON = this . checkConfigJson ( configJSON )
284
+ configJSON = this . checkConfigJson ( yamlJsParser . parse ( this . state . ssoConfig . config . config ) )
286
285
287
286
if (
288
287
this . state . sso === SSOProvider . microsoft &&
You can’t perform that action at this time.
0 commit comments