Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit be8498d

Browse files
mintbridgestevengill
authored andcommittedSep 26, 2017
add check for isArray so that strings don't cause an error when calling .filter
This closes #4
1 parent 322f304 commit be8498d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/pbxProject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ pbxProject.prototype.removeFromFrameworkSearchPaths = function(file) {
11101110

11111111
searchPaths = buildSettings[SEARCH_PATHS];
11121112

1113-
if (searchPaths) {
1113+
if (searchPaths && Array.isArray(searchPaths)) {
11141114
var matches = searchPaths.filter(function(p) {
11151115
return p.indexOf(new_path) > -1;
11161116
});
@@ -1157,7 +1157,7 @@ pbxProject.prototype.removeFromLibrarySearchPaths = function(file) {
11571157

11581158
searchPaths = buildSettings[SEARCH_PATHS];
11591159

1160-
if (searchPaths) {
1160+
if (searchPaths && Array.isArray(searchPaths)) {
11611161
var matches = searchPaths.filter(function(p) {
11621162
return p.indexOf(new_path) > -1;
11631163
});

0 commit comments

Comments
 (0)
Please sign in to comment.