Skip to content

Commit c446cd1

Browse files
committed
chore: improve when to display warning
1 parent d260a28 commit c446cd1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/prepare.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,10 @@ function updateProjectSplashScreen (platformConfig, locations) {
401401
break;
402402

403403
case 'windowSplashScreenBrandingImage':
404-
events.emit('warn', `"${themeKey}" is currently not supported by the splash screen compatibility library. https://issuetracker.google.com/issues/194301890`);
404+
// display warning only when set.
405+
if (cdvConfigPrefValue) {
406+
events.emit('warn', `"${themeKey}" is currently not supported by the splash screen compatibility library. https://issuetracker.google.com/issues/194301890`);
407+
}
405408

406409
updateProjectSplashScreenImage(locations, themeKey, cdvConfigPrefKey, cdvConfigPrefValue);
407410

@@ -547,7 +550,7 @@ function updateProjectSplashScreenImage (locations, themeKey, cdvConfigPrefKey,
547550
let emitType = 'verbose';
548551
let emmitMessage = `The "${cdvConfigPrefKey}" is undefined. Cordova's default will be used.`;
549552

550-
if (!fs.existsSync(cdvConfigPrefValue)) {
553+
if (cdvConfigPrefValue && !fs.existsSync(cdvConfigPrefValue)) {
551554
emitType = 'warn';
552555
emmitMessage = `The "${cdvConfigPrefKey}" value does not exist. Cordova's default will be used.`;
553556
}

0 commit comments

Comments
 (0)