Skip to content

Commit 6b9dd75

Browse files
committed
Pass enviroment to runtime config only when defined
1 parent ee050bd commit 6b9dd75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,12 @@ function prepareRuntimeConfig(options: Partial<WebAssemblyStartOptions>, onConfi
138138
const config: MonoConfig = {
139139
maxParallelDownloads: 1000000, // disable throttling parallel downloads
140140
enableDownloadRetry: false, // disable retry downloads
141-
applicationEnvironment: options.environment,
142141
};
143142

143+
if (options.environment) {
144+
config.applicationEnvironment = options.environment;
145+
}
146+
144147
const onConfigLoaded = async (loadedConfig: MonoConfig) => {
145148
if (!loadedConfig.environmentVariables) {
146149
loadedConfig.environmentVariables = {};

0 commit comments

Comments
 (0)