network: fix crash because of ipaddr.parse usage
This commit is contained in:
+1
-4
@@ -155,12 +155,9 @@ async function getIPv4() {
|
||||
return await api(config.provider).getIPv4(config);
|
||||
}
|
||||
|
||||
// returns RFC 5952 formatted address (https://datatracker.ietf.org/doc/html/rfc5952)
|
||||
async function getIPv6() {
|
||||
const config = await getIPv6Config();
|
||||
const result = await api(config.provider).getIPv6(config);
|
||||
if (!result) return null;
|
||||
return ipaddr.parse(result).toRFC5952String();
|
||||
return await api(config.provider).getIPv6(config);
|
||||
}
|
||||
|
||||
async function detectIP() {
|
||||
|
||||
Reference in New Issue
Block a user