mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 12:14:20 +01:00
remove empty entries on ip address split
This commit is contained in:
parent
01aef63203
commit
42694a872f
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ public static class Extensions
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(ipAddress))
|
if (!string.IsNullOrEmpty(ipAddress))
|
||||||
{
|
{
|
||||||
var addresses = ipAddress.Split(',');
|
var addresses = ipAddress.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (addresses.Length != 0)
|
if (addresses.Length != 0)
|
||||||
return addresses.Last();
|
return addresses.Last();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue