File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,17 @@ export const selectCurrentAuthServices = createSelector(
81
81
const probeServices = anyProbeServices ( resource ) ;
82
82
const probeServiceServices = flatten ( probeServices . map ( p => Utils . getServices ( p ) ) ) ;
83
83
84
+ const allAuthServices = resourceServices . concat ( probeServiceServices ) ;
85
+
84
86
for ( const authProfile of serviceProfiles ) {
85
- const profiledAuthServices = resourceServices . concat ( probeServiceServices ) . filter (
87
+ const profiledAuthServices = allAuthServices . filter (
86
88
p => authProfile . profile === p . getProfile ( ) ,
87
89
) ;
88
90
89
91
for ( const service of profiledAuthServices ) {
90
92
lastAttemptedService = service ;
91
93
// external service may have no id to track by (auth1 vs auth2)
92
- const serviceKey = ( authProfile . external ) ? ( service ?. id || 'external' ) : service ?. id ;
94
+ const serviceKey = ( authProfile . external ) ? 'external' : service ?. id ;
93
95
94
96
if ( ! auth [ serviceKey ] || auth [ serviceKey ] . isFetching || auth [ serviceKey ] . ok ) {
95
97
return service ;
@@ -103,10 +105,11 @@ export const selectCurrentAuthServices = createSelector(
103
105
return Object . values ( currentAuthServices . reduce ( ( h , service ) => {
104
106
if ( ! service ) return h ;
105
107
const external = serviceProfiles . filter ( x => x . external ) . find ( s => ( s . profile === service . getProfile ( ) ) ) ;
106
- const serviceKey = ( external ) ? ( service . id || 'external' ) : service . id ;
108
+ const serviceKey = ( external ) ? 'external' : service . id ;
107
109
if ( ! h [ serviceKey ] ) {
108
110
h [ serviceKey ] = service ; // eslint-disable-line no-param-reassign
109
111
}
112
+
110
113
return h ;
111
114
} , { } ) ) ;
112
115
} ,
You can’t perform that action at this time.
0 commit comments