Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/521#discussion_r107840862
  
    --- Diff: cordova-lib/src/cordova/restore-util.js ---
    @@ -114,13 +135,19 @@ function installPlatformsFromConfigXML(platforms, 
opts) {
                 events.emit('verbose', 'Package.json and config.xml platforms 
are different. Updating config.xml with most current list of platforms.');
                 comboArray.forEach(function(item) {
                     var prefixItem = ('cordova-'+item);
    +
                     // Modify package.json if any of these cases are true:
    -                if((pkgJson.dependencies === undefined && 
Object.keys(mergedPlatformSpecs).length)||
    -                    (pkgJson.dependencies[item] === undefined && 
mergedPlatformSpecs[item]) ||
    -                    (pkgJson.dependencies[prefixItem] === undefined && 
mergedPlatformSpecs[prefixItem])) {
    +                if((pkgJson.dependencies === undefined && 
Object.keys(mergedPlatformSpecs).length) ||
    +                (pkgJson.dependencies && mergedPlatformSpecs && 
pkgJson.dependencies[item] === undefined && mergedPlatformSpecs[item]) || 
    +                (pkgJson.dependencies && mergedPlatformSpecs && 
pkgJson.dependencies[prefixItem] === undefined && 
mergedPlatformSpecs[prefixItem])) {
                         modifiedPkgJson = true;
                     }
     
    +                // if ((pkgJson.dependencies && mergedPlatformSpecs && 
pkgJson.dependencies[item] === undefined && mergedPlatformSpecs[item]) || 
    --- End diff --
    
    We can delete line 146-150


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to