From c446cd136bbecca483cdbea35420892fcc8f7e81 Mon Sep 17 00:00:00 2001 From: Erisu Date: Mon, 27 Jun 2022 12:27:52 +0900 Subject: [PATCH] chore: improve when to display warning --- lib/prepare.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/prepare.js b/lib/prepare.js index 1efc8dfaf9..68ff7120a4 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -401,7 +401,10 @@ function updateProjectSplashScreen (platformConfig, locations) { break; case 'windowSplashScreenBrandingImage': - events.emit('warn', `"${themeKey}" is currently not supported by the splash screen compatibility library. https://issuetracker.google.com/issues/194301890`); + // display warning only when set. + if (cdvConfigPrefValue) { + events.emit('warn', `"${themeKey}" is currently not supported by the splash screen compatibility library. https://issuetracker.google.com/issues/194301890`); + } updateProjectSplashScreenImage(locations, themeKey, cdvConfigPrefKey, cdvConfigPrefValue); @@ -547,7 +550,7 @@ function updateProjectSplashScreenImage (locations, themeKey, cdvConfigPrefKey, let emitType = 'verbose'; let emmitMessage = `The "${cdvConfigPrefKey}" is undefined. Cordova's default will be used.`; - if (!fs.existsSync(cdvConfigPrefValue)) { + if (cdvConfigPrefValue && !fs.existsSync(cdvConfigPrefValue)) { emitType = 'warn'; emmitMessage = `The "${cdvConfigPrefKey}" value does not exist. Cordova's default will be used.`; }