diff --git a/src/core/lib/IP.mjs b/src/core/lib/IP.mjs index e5d18dd7..91283447 100644 --- a/src/core/lib/IP.mjs +++ b/src/core/lib/IP.mjs @@ -352,10 +352,7 @@ export function ipv4ToStr(ipInt) { export function strToIpv6(ipStr, retArr=true) { if (retArr === false) { // TODO: Expand address. - if (ipStr.length % 2 === 1) { - ipStr = "0" + ipStr; - } - return Number("0x" + ipStr.replace(":", "")); + return Number("0x" + ipStr.replace(/\:/g, '')); } let j = 0; const blocks = ipStr.split(":"),