Skip to content

Commit 8faa64e

Browse files
committed
fix: Adjust for invalid splashscreen uri
This fixes an issue where the splashscreen image may not appear properly when the uno bootstrapper already rewrites the uri to include the package path.
1 parent 7bab9d1 commit 8faa64e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Uno.UI/ts/WindowManager.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ namespace Uno.UI {
111111
const UNO_BOOTSTRAP_APP_BASE = config.environmentVariables["UNO_BOOTSTRAP_APP_BASE"] || "";
112112
const UNO_BOOTSTRAP_WEBAPP_BASE_PATH = config.environmentVariables["UNO_BOOTSTRAP_WEBAPP_BASE_PATH"] || "";
113113

114-
const fullImagePath = UNO_BOOTSTRAP_APP_BASE !== ''
115-
? `${UNO_BOOTSTRAP_WEBAPP_BASE_PATH}${UNO_BOOTSTRAP_APP_BASE}/${UnoAppManifest.splashScreenImage}`
116-
: String(UnoAppManifest.splashScreenImage);
114+
let fullImagePath = String(UnoAppManifest.splashScreenImage);
115+
116+
// If the splashScreenImage image already points to the app base path, use it, otherwise we build it.
117+
if (UNO_BOOTSTRAP_APP_BASE !== '' && fullImagePath.indexOf(UNO_BOOTSTRAP_APP_BASE) == -1) {
118+
fullImagePath = `${UNO_BOOTSTRAP_WEBAPP_BASE_PATH}${UNO_BOOTSTRAP_APP_BASE}/${UnoAppManifest.splashScreenImage}`;
119+
}
117120

118121
img.src = fullImagePath;
119122

0 commit comments

Comments
 (0)