cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kam...@apache.org
Subject cordova-lib git commit: Fix setGlobalPreference() in ConfigParser
Date Wed, 08 Apr 2015 18:42:26 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 61de6302e -> ebadd2eff


Fix setGlobalPreference() in ConfigParser


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/ebadd2ef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/ebadd2ef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/ebadd2ef

Branch: refs/heads/master
Commit: ebadd2eff77f4161daf9d617a4c664afdd763e05
Parents: 61de630
Author: Mark Koudritsky <kamrik@gmail.com>
Authored: Wed Apr 8 14:41:54 2015 -0400
Committer: Mark Koudritsky <kamrik@gmail.com>
Committed: Wed Apr 8 14:41:54 2015 -0400

----------------------------------------------------------------------
 cordova-lib/src/configparser/ConfigParser.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/ebadd2ef/cordova-lib/src/configparser/ConfigParser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.js b/cordova-lib/src/configparser/ConfigParser.js
index a2fda08..f13521f 100644
--- a/cordova-lib/src/configparser/ConfigParser.js
+++ b/cordova-lib/src/configparser/ConfigParser.js
@@ -137,9 +137,10 @@ ConfigParser.prototype = {
         return findElementAttributeValue(name, this.doc.findall('preference'));
     },
     setGlobalPreference: function (name, value) {
-        var pref = this.doc.find('preference[@name="service_worker"]');
+        var pref = this.doc.find('preference[@name="' + name + '"]');
         if (!pref) {
             pref = new et.Element('preference');
+            pref.attrib.name = name;
             this.doc.getroot().append(pref);
         }
         pref.attrib.value = value;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message