diff --git a/lib/pbxProject.js b/lib/pbxProject.js index 1133940..ec66166 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -916,7 +916,7 @@ pbxProject.prototype.addBuildPhase = function(filePathsArray, buildPhaseType, co buildFile = buildFileSection[buildFileKey]; fileReference = fileReferenceSection[buildFile.fileRef]; - if (!fileReference) continue; + if (!fileReference || !fileReference.path) continue; var pbxFileObj = new pbxFile(fileReference.path); @@ -1148,7 +1148,7 @@ pbxProject.prototype.updateBuildProperty = function(prop, value, build, targetNa } } } - + var configs = this.pbxXCBuildConfigurationSection(); for (var configName in configs) { if (!COMMENT_KEY.test(configName)) { @@ -2091,7 +2091,7 @@ pbxProject.prototype.getBuildProperty = function(prop, build, targetName) { } } } - + var configs = this.pbxXCBuildConfigurationSection(); for (var configName in configs) { if (!COMMENT_KEY.test(configName)) {