mirror of https://github.com/h44z/wg-portal.git
fix parsing IP addresses in UI (ip-address lib was updated to V10)
This commit is contained in:
parent
f53d0b3d7f
commit
faf1d995a8
|
|
@ -4,12 +4,12 @@ export function ipToBigInt(ip) {
|
|||
// Check if it's an IPv4 address
|
||||
if (ip.includes(".")) {
|
||||
const addr = new Address4(ip)
|
||||
return addr.bigInteger()
|
||||
return addr.bigInt()
|
||||
}
|
||||
|
||||
// Otherwise, assume it's an IPv6 address
|
||||
const addr = new Address6(ip)
|
||||
return addr.bigInteger()
|
||||
return addr.bigInt()
|
||||
}
|
||||
|
||||
export function humanFileSize(size) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue