raphinesse commented on a change in pull request #1116:
URL: https://github.com/apache/cordova-ios/pull/1116#discussion_r646156013
##########
File path: bin/templates/scripts/cordova/lib/projectFile.js
##########
@@ -40,7 +39,7 @@ function parseProjectFile (locations) {
xcodeproj.parseSync();
const xcBuildConfiguration = xcodeproj.pbxXCBuildConfigurationSection();
- const plist_file_entry = _.find(xcBuildConfiguration, entry =>
entry.buildSettings && entry.buildSettings.INFOPLIST_FILE);
+ const plist_file_entry = Object.values(xcBuildConfiguration ||
{}).find(entry => entry.buildSettings && entry.buildSettings.INFOPLIST_FILE);
Review comment:
We could probably reduce this to the following:
```suggestion
const plist_file_entry = Object.values(xcBuildConfiguration).find(entry
=> entry.buildSettings && entry.buildSettings.INFOPLIST_FILE);
```
Since in the next line, `plist_file_entry` is assumed to be truthy, which
cannot be the case if `xcBuildConfiguration` is falsy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]