Bug 1039220 - Fix judgement rule for valid property. r=hchang
authorChuck Lee <chulee@mozilla.com>
Wed, 16 Jul 2014 18:06:13 +0800
changeset 216712 e95389b24a0d0b477f392a163007535031e57868
parent 216711 3fb8e38d7ce5ec261843689364f9cc0545a00447
child 216713 e8ad29f1166a523e727ff6fd297aa9eaf85e5eed
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershchang
bugs1039220
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1039220 - Fix judgement rule for valid property. r=hchang
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -1196,17 +1196,17 @@ var WifiManager = (function() {
   manager.setNetworkConfiguration = function(config, callback) {
     var netId = config.netId;
     var done = 0;
     var errors = 0;
 
     function hasValidProperty(name) {
       return ((name in config) &&
                config[name] != null &&
-               (["password", "wep_key0", "psk"].indexOf(name) !== -1 ||
+               (["password", "wep_key0", "psk"].indexOf(name) === -1 ||
                 config[name] !== '*'));
     }
 
     for (var n = 0; n < networkConfigurationFields.length; ++n) {
       let fieldName = networkConfigurationFields[n];
       if (!hasValidProperty(fieldName)) {
         ++done;
       } else {