@@ -249,21 +249,20 @@ export class AutoDiscovery {
249249
250250 // Step 7: Copy any other keys directly into the clientConfig. This is for
251251 // things like custom configuration of services.
252- Object . keys ( wellknown )
253- . map ( ( k ) => {
254- if ( k === "m.homeserver" || k === "m.identity_server" ) {
255- // Only copy selected parts of the config to avoid overwriting
256- // properties computed by the validation logic above.
257- const notProps = [ "error" , "state" , "base_url" ] ;
258- for ( const prop of Object . keys ( wellknown [ k ] ) ) {
259- if ( notProps . includes ( prop ) ) continue ;
260- clientConfig [ k ] [ prop ] = wellknown [ k ] [ prop ] ;
261- }
262- } else {
263- // Just copy the whole thing over otherwise
264- clientConfig [ k ] = wellknown [ k ] ;
252+ Object . keys ( wellknown ) . forEach ( ( k ) => {
253+ if ( k === "m.homeserver" || k === "m.identity_server" ) {
254+ // Only copy selected parts of the config to avoid overwriting
255+ // properties computed by the validation logic above.
256+ const notProps = [ "error" , "state" , "base_url" ] ;
257+ for ( const prop of Object . keys ( wellknown [ k ] ) ) {
258+ if ( notProps . includes ( prop ) ) continue ;
259+ clientConfig [ k ] [ prop ] = wellknown [ k ] [ prop ] ;
265260 }
266- } ) ;
261+ } else {
262+ // Just copy the whole thing over otherwise
263+ clientConfig [ k ] = wellknown [ k ] ;
264+ }
265+ } ) ;
267266
268267 // Step 8: Give the config to the caller (finally)
269268 return Promise . resolve ( clientConfig ) ;
0 commit comments