Bug 1079173 - Check existence of netId instead of check it's value. r=hchang
authorChuck Lee <chulee@mozilla.com>
Mon, 13 Oct 2014 10:05:33 +0800
changeset 210138 f634aef97d4709ea39d76a786e014191f57837c2
parent 210137 f926c956c3cdefda45099281ddce8ceb60cefe10
child 210139 b0d430fb34b75666cfbd0d370a6b13cd9c0cc65d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewershchang
bugs1079173
milestone35.0a1
Bug 1079173 - Check existence of netId instead of check it's value. r=hchang
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -1854,17 +1854,17 @@ function WifiWorker() {
         ("password" in net && net.password) ||
         ("wep_key0" in net && net.wep_key0)) {
       password = "*";
     }
 
     var pub = new Network(ssid, security, password);
     if (net.identity)
       pub.identity = dequote(net.identity);
-    if (net.netId)
+    if ("netId" in net)
       pub.known = true;
     if (net.scan_ssid === 1)
       pub.hidden = true;
     if ("ca_cert" in net && net.ca_cert &&
         net.ca_cert.indexOf("keystore://WIFI_SERVERCERT_" === 0)) {
       pub.serverCertificate = net.ca_cert.substr(27);
     }
     if(net.subject_match) {