From 0f8b2c0183070ef0364972b60d54dd0818e61e97 Mon Sep 17 00:00:00 2001 From: matheusccastro Date: Wed, 17 Jan 2024 23:50:12 -0300 Subject: [PATCH] fix: fix cordova warnings for launch screens when using the new splash keys. --- tools/cordova/builder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index aba7ac3d5d..5a0860892b 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -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); },