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

    https://github.com/apache/cordova-windows/pull/203#discussion_r84070152
  
    --- Diff: template/cordova/lib/ConfigChanges.js ---
    @@ -34,54 +39,121 @@ util.inherits(PlatformMunger, CommonMunger);
      *   need to be removed or added to the file
      */
     PlatformMunger.prototype.apply_file_munge = function (file, munge, remove) 
{
    -    // Call parent class' method
    -    PlatformMunger.super_.prototype.apply_file_munge.call(this, file, 
munge, remove);
    -
    -    // CB-11066 If this is a windows10 manifest and we're removing the 
changes
    -    // then we also need to check if there are <Capability> elements were 
previously
    -    // added and schedule removal of corresponding <uap:Capability> 
elements
    -    if (remove && file === 'package.windows10.appxmanifest') {
    -        var uapCapabilitiesMunge = generateUapCapabilities(munge);
    -        // We do not check whether generated munge is empty or not before 
calling
    -        // 'apply_file_munge' since applying empty one is just a no-op
    -        PlatformMunger.super_.prototype.apply_file_munge.call(this, file, 
uapCapabilitiesMunge, remove);
    -    }
    +
    +    // Create a copy to avoid modification of original munge
    +    var mungeCopy = cloneObject(munge);
    +    var capabilities = mungeCopy.parents[CAPS_SELECTOR];
    +
    +    // Add 'uap' prefixes for windows 10 manifest
    +    if (file === WINDOWS10_MANIFEST)
    +        capabilities = generateUapCapabilities(capabilities);
    +
    +    // Remove duplicates and sort capabilities when installing plugin
    +    if (!remove)
    --- End diff --
    
    Please add `{}` here.


---
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