Skip to content

Commit 7d8bc3b

Browse files
authored
Merge pull request #1114 from Microsoft/NetworkHelper-Tweak
ConnectionInformation tweak
2 parents ceef571 + 495b4ad commit 7d8bc3b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Microsoft.Toolkit.Uwp/Helpers/Network/ConnectionInformation.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ public virtual void UpdateConnectionInformation(ConnectionProfile profile)
6868
ConnectivityLevel = profile.GetNetworkConnectivityLevel();
6969
ConnectionCost = profile.GetConnectionCost();
7070
SignalStrength = profile.GetSignalBars();
71-
networkNames.AddRange(profile.GetNetworkNames());
71+
72+
var names = profile.GetNetworkNames();
73+
if (names?.Count > 0)
74+
{
75+
networkNames.AddRange(names);
76+
}
7277

7378
switch (ConnectivityLevel)
7479
{

0 commit comments

Comments
 (0)