You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/06/06 16:30:26 UTC
[GitHub] [cordova-ios] raphinesse commented on a change in pull request #1116: refactor(projectFile): drop dependency on underscore
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org