Bug report
CHECKLIST
Current behavior:
Running prepare for Android platform overrides colors.xml by removing everything in it and adding only the Accent color required by this plugin.
Expected behavior:
The plugin after prepare script actually tries not to override existing colors but instead adding the accent one, but it fails because of a wrong condition check.
Steps to reproduce:
- Clone test project.
- Manually define custom colors in colors.xml Android file.
- Run cordova prepare Android
- Check colors.xml file contents. Step 2 colors are gone.
Screenshots
Environment information
- Cordova CLI version
- 9.0.0 (cordova-lib@9.0.1)
- Cordova platform version
- Dev machine OS and version, e.g.
Related code:
The issue is specifically in after_prepare.js line #131:
if($resources.color && $resources.color._text) {
As $resources.color is an array, $resources.color._text is always undefined/false.
Other information:
Issue was introduced as part of: #284
Bug report
CHECKLIST
I have read the issue reporting guidelines
I confirm this is a suspected bug or issue that will affect other users
Current behavior:
Running prepare for Android platform overrides colors.xml by removing everything in it and adding only the Accent color required by this plugin.
Expected behavior:
The plugin after prepare script actually tries not to override existing colors but instead adding the accent one, but it fails because of a wrong condition check.
Steps to reproduce:
Screenshots
Environment information
Related code:
The issue is specifically in after_prepare.js line #131:
As $resources.color is an array, $resources.color._text is always undefined/false.
Other information:
Issue was introduced as part of: #284