Bug 522309 - filter out access points that do not have SSIDs. r=gavin

--HG--
extra : rebase_source : 3c20c760092abe5fa4a38416be9e5397cadbd0ed
This commit is contained in:
Doug Turner 2009-10-14 13:20:03 -07:00
Родитель 843c9a581d
Коммит 30c60f7bda
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -321,11 +321,13 @@ WifiGeoPositionProvider.prototype = {
request.access_token = accessToken;
if (accessPoints != null) {
request.wifi_towers = accessPoints.map(function (ap) ({
mac_address: ap.mac,
function filterBlankSSIDs(ap) ap.ssid != ""
function deconstruct(ap) ({
mac_address: ap.mac,
ssid: ap.ssid,
signal_strength: ap.signal,
}));
signal_strength: ap.signal
})
request.wifi_towers = accessPoints.filter(filterBlankSSIDs).map(deconstruct);
}
var jsonString = JSON.stringify(request);