You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by br...@apache.org on 2018/12/19 19:49:04 UTC

[cordova-node-xcode] branch master updated: Updated to use ECMAScript 2015 Object.assign. (#14)

This is an automated email from the ASF dual-hosted git repository.

brodybits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git


The following commit(s) were added to refs/heads/master by this push:
     new b1ff4cc  Updated to use ECMAScript 2015 Object.assign. (#14)
b1ff4cc is described below

commit b1ff4cc775379e7dc64490c95262444027710a52
Author: Mark Atkinson <ma...@gmail.com>
AuthorDate: Wed Dec 19 19:48:59 2018 +0000

    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.
---
 lib/parser/pbxproj.js | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

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 @@ function peg$parse(input, options) {
               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 @@ function peg$parse(input, options) {
     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) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org