Skip to content

Commit ad51f4d

Browse files
authored
Update NetworkInterfaceViewModel.cs
1 parent db310fe commit ad51f4d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Source/NETworkManager/ViewModels/Applications/NetworkInterfaceViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ public NetworkInterfaceInfo SelectedNetworkInterface
144144
ConfigEnableStaticIPAddress = true;
145145
ConfigIPAddress = value.IPv4Address.FirstOrDefault().ToString();
146146
ConfigSubnetmaskOrCidr = value.Subnetmask.FirstOrDefault().ToString();
147-
if (value.IPv4Gateway.FirstOrDefault() != null)
148-
ConfigGateway = value.IPv4Gateway.FirstOrDefault().ToString();
147+
ConfigGateway = (value.IPv4Gateway == null) ? value.IPv4Gateway.ToString() : string.Empty;
149148
}
150149

151150
if (value.DNSAutoconfigurationEnabled)

0 commit comments

Comments
 (0)