network: Handle networks with no access points
This avoids a couple of warnings when encountering such a network. https://gitlab.gnome.org/GNOME/gnome-shell/issues/76
This commit is contained in:
parent
7a3927c168
commit
c15e163eb1
@ -995,8 +995,16 @@ var NMWirelessDialog = new Lang.Class({
|
||||
else if (!oneHasConnection && twoHasConnection)
|
||||
return 1;
|
||||
|
||||
let oneStrength = one.accessPoints[0].strength;
|
||||
let twoStrength = two.accessPoints[0].strength;
|
||||
let oneAp = one.accessPoints[0] || null;
|
||||
let twoAp = two.accessPoints[0] || null;
|
||||
|
||||
if (oneAp != null && twoAp == null)
|
||||
return -1;
|
||||
else if (oneAp == null && twoAp != null)
|
||||
return 1;
|
||||
|
||||
let oneStrength = oneAp.strength;
|
||||
let twoStrength = twoAp.strength;
|
||||
|
||||
// place stronger connections first
|
||||
if (oneStrength != twoStrength)
|
||||
|
Loading…
Reference in New Issue
Block a user