cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7658) generateTabletXMLFile shouldn't iterate config.configFileInjections unless it has elements
Date Mon, 29 Sep 2014 20:27:33 GMT

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

ASF subversion and git services commented on CB-7658:
-----------------------------------------------------

Commit 7005fb555f53f56fb4687824f0994042feed5349 in cordova-blackberry's branch refs/heads/master
from [~jsoref]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git;h=7005fb5 ]

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)

Mime
View raw message