Skip to content

Commit b1ff4cc

Browse files
mark-atkChris Brody
authored and
Chris Brody
committed
Updated to use ECMAScript 2015 Object.assign. (#14)
Updated pbxproj.js to use ECMAScript 2015 Object.assign to avoid Maximum call stack size exceeded error when running react-native link.
1 parent a83c407 commit b1ff4cc

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

lib/parser/pbxproj.js

+1-13
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function peg$parse(input, options) {
178178
var returnObject = list[0][0];
179179
for(var i = 1; i < list.length; i++){
180180
var another = list[i][0];
181-
returnObject = merge_obj(returnObject, another);
181+
returnObject = Object.assign(returnObject, another);
182182
}
183183
return returnObject;
184184
},
@@ -1879,18 +1879,6 @@ function peg$parse(input, options) {
18791879
return s0;
18801880
}
18811881

1882-
1883-
function merge_obj(obj, secondObj) {
1884-
if (!obj)
1885-
return secondObj;
1886-
1887-
for(var i in secondObj)
1888-
obj[i] = merge_obj(obj[i], secondObj[i]);
1889-
1890-
return obj;
1891-
}
1892-
1893-
18941882
peg$result = peg$startRuleFunction();
18951883

18961884
if (peg$result !== peg$FAILED && peg$currPos === input.length) {

0 commit comments

Comments
 (0)