Merge pull request #12971 from matheusccastroo/cordova-warning-launch-screens

Fix `cordova` launch screen warnings on `2.14`
This commit is contained in:
Denilson
2024-01-30 10:39:37 -04:00
committed by GitHub

View File

@@ -771,7 +771,7 @@ configuration. The key may be deprecated.`);
Object.keys(splashIosKeys).concat(Object.keys(splashAndroidKeys));
Object.keys(launchScreens).forEach((key) => {
if (!(key in validDevices)) {
if (!validDevices.includes(key)) {
Console.labelWarn(`${key}: unknown key in App.launchScreens \
configuration. The key may be deprecated.`);
}
@@ -780,7 +780,7 @@ configuration. The key may be deprecated.`);
if (typeof value !== "string" && key.includes("android")) {
throw new Error("Android splash screen path must be a string. To enable dark splash screens for your app, check out the android developer guide: https://developer.android.com/develop/ui/views/theming/darktheme.");
}
})
});
Object.assign(builder.imagePaths.splash, launchScreens);
},