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