File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/core/src/codewhisperer/util Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -442,8 +442,8 @@ export class AuthUtil {
442442 * a connection if it has some CW scopes.
443443 */
444444 findMinimalQConnection ( connections : AwsConnection [ ] ) : AwsConnection | undefined {
445- const hasQScopes = ( c : AwsConnection ) => codeWhispererCoreScopes . every ( s => c . scopes ?. includes ( s ) )
446- const score = ( c : AwsConnection ) => Number ( hasQScopes ( c ) ) * 10 + Number ( c . state === 'valid' )
445+ const hasQScopes = ( c ? : AwsConnection ) => codeWhispererCoreScopes . every ( s => ! ! c ? .scopes ?. includes ( s ) )
446+ const score = ( c ? : AwsConnection ) => Number ( hasQScopes ( c ) ) * 10 + Number ( c ? .state === 'valid' )
447447 connections . sort ( function ( a , b ) {
448448 return score ( b ) - score ( a )
449449 } )
You can’t perform that action at this time.
0 commit comments