mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 965346 - Part 1: Ensure that callback is called, even when reply is null. r=mrbkap
This commit is contained in:
parent
245097b752
commit
e7d1064645
@ -1075,8 +1075,8 @@ var WifiManager = (function() {
|
||||
manager.getConfiguredNetworks = function(callback) {
|
||||
wifiCommand.listNetworks(function (reply) {
|
||||
var networks = Object.create(null);
|
||||
var lines = reply.split("\n");
|
||||
if (lines.length === 1) {
|
||||
var lines = reply ? reply.split("\n") : 0;
|
||||
if (lines.length <= 1) {
|
||||
// We need to make sure we call the callback even if there are no
|
||||
// configured networks.
|
||||
callback(networks);
|
||||
|
Loading…
x
Reference in New Issue
Block a user