From e81ecabc18b0e43a1ae5457f16ebcbb8b0b62460 Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Fri, 12 Jun 2020 01:22:35 -0700 Subject: [PATCH] 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 --- lib/pbxProject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pbxProject.js b/lib/pbxProject.js index 068548a..1133940 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -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;