Skip to content

Commit e81ecab

Browse files
Need to check for object existence (#112)
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
1 parent 56b8ffd commit e81ecab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbxProject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ function correctForFrameworksPath(file, project) {
16791679
function correctForPath(file, project, group) {
16801680
var r_group_dir = new RegExp('^' + group + '[\\\\/]');
16811681

1682-
if (project.pbxGroupByName(group).path)
1682+
if (project.pbxGroupByName(group) && project.pbxGroupByName(group).path)
16831683
file.path = file.path.replace(r_group_dir, '');
16841684

16851685
return file;

0 commit comments

Comments
 (0)