[ 
https://issues.apache.org/jira/browse/CB-7658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152159#comment-14152159
 ] 

ASF GitHub Bot commented on CB-7658:
------------------------------------

GitHub user jsoref opened a pull request:

    https://github.com/apache/cordova-blackberry/pull/177

    CB-7658 generateTabletXMLFile only do munging if config.configFileInject...

    ...ions has elements
    
    @bryanhiggins r?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jsoref/cordova-blackberry cb_7658

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-blackberry/pull/177.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #177
    
----
commit 7005fb555f53f56fb4687824f0994042feed5349
Author: Josh Soref <[email protected]>
Date:   2014-09-29T19:50:44Z

    CB-7658 generateTabletXMLFile only do munging if 
config.configFileInjections has elements

----


> generateTabletXMLFile shouldn't iterate config.configFileInjections unless it 
> has elements
> ------------------------------------------------------------------------------------------
>
>                 Key: CB-7658
>                 URL: https://issues.apache.org/jira/browse/CB-7658
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: BlackBerry
>    Affects Versions: 3.5.0
>            Reporter: Josh Soref
>            Assignee: Josh Soref
>
> The current code checks to see if there's a non null, array, before iterating 
> over config.configFileInjections, but... 
> {quote}
> function processResult(data, session) {
>     var widgetConfig = {};
> ...
>     //store any config-file element injections
>     widgetConfig.configFileInjections = _config_doc.findall("config-file");
>     return widgetConfig;
> {quote}
> {quote}
> function generateTabletXMLFile(session, config) \{
> ...
>     //Inject any config-file modifications for bar-descriptor.xml
>     if (config.configFileInjections && 
> Array.isArray(config.configFileInjections)) \{
>          xmlDoc = new et.ElementTree(et.XML(xmlData));
>         config.configFileInjections.forEach(function (config_file) \{
>             if (config_file.attrib\["parent"] && 
> config_file.attrib\["target"]  && config_file.attrib\["target"] === 
> "bar-descriptor.xml") \{
>                 xmlHelper.graftXML(xmlDoc, config_file._children, 
> config_file.attrib\["parent"]);
>             }
>         });
>         xmlData = xmlDoc.write(\{indent: 4});
>     }
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to