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.
diff --git a/lib/parser/pbxproj.js b/lib/parser/pbxproj.js
index 1ed30c5..81ae25f 100644
--- a/lib/parser/pbxproj.js
+++ b/lib/parser/pbxproj.js
@@ -178,7 +178,7 @@
var returnObject = list[0][0];
for(var i = 1; i < list.length; i++){
var another = list[i][0];
- returnObject = merge_obj(returnObject, another);
+ returnObject = Object.assign(returnObject, another);
}
return returnObject;
},
@@ -1879,18 +1879,6 @@
return s0;
}
-
- function merge_obj(obj, secondObj) {
- if (!obj)
- return secondObj;
-
- for(var i in secondObj)
- obj[i] = merge_obj(obj[i], secondObj[i]);
-
- return obj;
- }
-
-
peg$result = peg$startRuleFunction();
if (peg$result !== peg$FAILED && peg$currPos === input.length) {