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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5ad1bdb  refactor(ConfigChanges): use for-of loop for iterating over 
array (#159)
5ad1bdb is described below

commit 5ad1bdbec90e3ad740eec8538a2a6e653c30b0d0
Author: Raphael von der GrĂ¼n <[email protected]>
AuthorDate: Tue Mar 2 15:04:38 2021 +0100

    refactor(ConfigChanges): use for-of loop for iterating over array (#159)
---
 src/ConfigChanges/ConfigChanges.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ConfigChanges/ConfigChanges.js 
b/src/ConfigChanges/ConfigChanges.js
index cbd3b25..60fe7cc 100644
--- a/src/ConfigChanges/ConfigChanges.js
+++ b/src/ConfigChanges/ConfigChanges.js
@@ -67,13 +67,13 @@ class PlatformMunger {
     // The remove parameter tells whether to add the change or remove it.
     apply_file_munge (file, munge, remove) {
         for (const selector in munge.parents) {
-            for (const xml_child in munge.parents[selector]) {
+            for (const mungeElem of munge.parents[selector]) {
                 // this xml child is new, graft it (only if config file exists)
                 const config_file = this.config_keeper.get(this.project_dir, 
this.platform, file);
 
                 if (config_file.exists) {
                     const operation = remove ? 'prune_child' : 'graft_child';
-                    config_file[operation](selector, 
munge.parents[selector][xml_child]);
+                    config_file[operation](selector, mungeElem);
                 } else {
                     events.emit('warn', `config file ${file} requested for 
changes not found at ${config_file.filepath}, ignoring`);
                 }


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

Reply via email to