network: Avoid JS error when activating VPN connection
If the call to settings.get_connection_by_path in ensureActiveConnectionProps returns null, we'll hit a JS error here. Seems to happen always when activating a VPN connection. Avoid that. Giovanni says: "I believe this is papering over an existing bug, but it's possible for settings.get_connection_by_path() to legitimately return null (if the connection is owned by a different user and invisible to the current one), so the fix is correct anyway." https://bugzilla.gnome.org/show_bug.cgi?id=759793
This commit is contained in:
parent
a6878855e9
commit
b30a528225
@ -1541,8 +1541,10 @@ const NMVPNSection = new Lang.Class({
|
|||||||
item.setActiveConnection(null);
|
item.setActiveConnection(null);
|
||||||
}
|
}
|
||||||
vpnConnections.forEach(Lang.bind(this, function(a) {
|
vpnConnections.forEach(Lang.bind(this, function(a) {
|
||||||
let item = this._connectionItems.get(a._connection.get_uuid());
|
if (a._connection) {
|
||||||
item.setActiveConnection(a);
|
let item = this._connectionItems.get(a._connection.get_uuid());
|
||||||
|
item.setActiveConnection(a);
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user