From d5d448888d6d44b7da90d91db1a286731a2fdc61 Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Thu, 18 Jun 2020 09:58:42 -0300 Subject: [PATCH] fix: support both adaptive and standard icons at the same time (#1001) --- bin/templates/cordova/lib/prepare.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/templates/cordova/lib/prepare.js b/bin/templates/cordova/lib/prepare.js index 098cab8c..6e8e92fe 100644 --- a/bin/templates/cordova/lib/prepare.js +++ b/bin/templates/cordova/lib/prepare.js @@ -457,6 +457,11 @@ function updateIconResourceForAdaptive (preparedIcons, resourceMap, platformReso background = android_icons[density].background; foreground = android_icons[density].foreground; + if (!background || !foreground) { + // This icon isn't an adaptive icon, so skip it + continue; + } + if (background.startsWith('@color')) { // Colors Use Case backgroundVal = background; // Example: @color/background_foobar_1