@@ -54,15 +54,15 @@ export const ConsoleAuthorization = ({
5454 const [ selectedAuthorizationFlow , setSelectedAuthorizationFlow ] = useState < string > ( noAuthFlow ) ;
5555 const [ selectedSubscriptionKey , setSelectedSubscriptionKey ] = useState < { name : string , value : string } > (
5656 subscriptionKey
57- ? products . flatMap ( p => p . subscriptionKeys ) . find ( k => k . value === subscriptionKey )
57+ ? products ? .flatMap ( p => p . subscriptionKeys ) . find ( k => k . value === subscriptionKey )
5858 : products ?. [ 0 ] ?. subscriptionKeys [ 0 ] ?? null
5959 ) ;
6060 const [ username , setUsername ] = useState < string > ( "" ) ;
6161 const [ password , setPassword ] = useState < string > ( "" ) ;
6262
6363 const renderAuthorization = ( ) => (
6464 < >
65- { authorizationServers . length > 0 && selectedAuthorizationServer &&
65+ { authorizationServers ? .length > 0 && selectedAuthorizationServer &&
6666 < >
6767 < Stack className = "auth-detail" >
6868 < Label htmlFor = "auth-servers-dropdown" > Authorization server</ Label >
@@ -108,7 +108,7 @@ export const ConsoleAuthorization = ({
108108 type = "text"
109109 placeholder = "Enter username"
110110 value = { username }
111- onChange = { ( VARIABLE_DEFINITION , data ) => setUsername ( data . value ) }
111+ onChange = { ( _ , data ) => setUsername ( data . value ) }
112112 />
113113 </ Stack >
114114 < Stack className = "auth-detail" styles = { { root : { marginBottom : 24 } } } >
@@ -129,7 +129,7 @@ export const ConsoleAuthorization = ({
129129 </ >
130130 }
131131 { subscriptionRequired && (
132- ( products . length > 0 && selectedSubscriptionKey )
132+ ( products ? .length > 0 && selectedSubscriptionKey )
133133 ? < Stack className = "auth-detail" >
134134 < Label htmlFor = "subscription-key-dropdown" > Subscription key</ Label >
135135 < Dropdown
0 commit comments