@@ -105,12 +105,12 @@ export class WebRootComponentManager implements DescriptorHandler, RootComponent
105105 // may take a long time to load, so starting to load them now potentially reduces
106106 // the time to interactvity.
107107 if ( descriptor . type === 'webassembly' ) {
108- this . startLoadingWebAssemblyIfNotStarted ( ) ;
108+ this . startLoadingWebAssemblyIfNotStarted ( descriptor . environment ) ;
109109 } else if ( descriptor . type === 'auto' ) {
110110 // If the WebAssembly runtime starts downloading because an Auto component was added to
111111 // the page, we limit the maximum number of parallel WebAssembly resource downloads to 1
112112 // so that the performance of any Blazor Server circuit is minimally impacted.
113- this . startLoadingWebAssemblyIfNotStarted ( /* maxParallelDownloadsOverride */ 1 ) ;
113+ this . startLoadingWebAssemblyIfNotStarted ( descriptor . environment , /* maxParallelDownloadsOverride */ 1 ) ;
114114 }
115115
116116 const ssrComponentId = this . _nextSsrComponentId ++ ;
@@ -125,15 +125,14 @@ export class WebRootComponentManager implements DescriptorHandler, RootComponent
125125 this . circuitMayHaveNoRootComponents ( ) ;
126126 }
127127
128- private async startLoadingWebAssemblyIfNotStarted ( maxParallelDownloadsOverride ?: number ) {
128+ private async startLoadingWebAssemblyIfNotStarted ( environment : string | undefined , maxParallelDownloadsOverride ?: number ) {
129129 if ( hasStartedLoadingWebAssemblyPlatform ( ) ) {
130130 return ;
131131 }
132132
133133 setWaitForRootComponents ( ) ;
134134
135- // MF TODO: Pass the environment
136- const loadWebAssemblyPromise = loadWebAssemblyPlatformIfNotStarted ( undefined ) ;
135+ const loadWebAssemblyPromise = loadWebAssemblyPlatformIfNotStarted ( environment ) ;
137136 const bootConfig = await waitForBootConfigLoaded ( ) ;
138137
139138 if ( maxParallelDownloadsOverride !== undefined ) {
@@ -179,12 +178,11 @@ export class WebRootComponentManager implements DescriptorHandler, RootComponent
179178 }
180179 }
181180
182- private async startWebAssemblyIfNotStarted ( ) {
183- this . startLoadingWebAssemblyIfNotStarted ( ) ;
181+ private async startWebAssemblyIfNotStarted ( environment ?: string ) {
182+ this . startLoadingWebAssemblyIfNotStarted ( environment ) ;
184183
185184 if ( ! hasStartedWebAssembly ( ) ) {
186- // MF TODO: Pass the environment
187- await startWebAssembly ( this , undefined ) ;
185+ await startWebAssembly ( this , environment ) ;
188186 }
189187 }
190188
0 commit comments