Skip to content

Commit

Permalink
Need to check for object existence (#112)
Browse files Browse the repository at this point in the history
When this code runs and a folder called "Resources" is not in the XCode project this call fails.

Need to check for object existence before accessing path.

There should be no impact from this change only preventing a run time error when a folder is not present
  • Loading branch information
DamienBitrise authored Jun 12, 2020
1 parent 56b8ffd commit e81ecab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ function correctForFrameworksPath(file, project) {
function correctForPath(file, project, group) {
var r_group_dir = new RegExp('^' + group + '[\\\\/]');

if (project.pbxGroupByName(group).path)
if (project.pbxGroupByName(group) && project.pbxGroupByName(group).path)
file.path = file.path.replace(r_group_dir, '');

return file;
Expand Down

0 comments on commit e81ecab

Please sign in to comment.