From 05f51b30d0df1d79aaf8034a467066024503b244 Mon Sep 17 00:00:00 2001 From: Michael Rowley Date: Thu, 30 Dec 2021 14:37:33 +0000 Subject: [PATCH] Fixed compilation errors --- src/core/lib/IP.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/lib/IP.mjs b/src/core/lib/IP.mjs index 0393f8d9..f72fa2ae 100644 --- a/src/core/lib/IP.mjs +++ b/src/core/lib/IP.mjs @@ -390,19 +390,19 @@ export function strToIpv6(ipStr, retArr=true) { * * @param {string} ipStr * @returns {string} - * + * * @example * // returns "5555:126f:0000:0000:0000:0000:0000:0001" * expandIpv6("5555:126f::0001"); */ - export function expandIpv6(ipStr) { +export function expandIpv6(ipStr) { const compactIndex = ipStr.search("::"); let expandedStr = ipStr.substring(0, compactIndex); // 1234:5678::.. - const insertOffset = compactIndex == 0; + const insertOffset = compactIndex === 0; // 0 / 1 const ipEnd = ipStr.substring(compactIndex + 1); // :7ABC:DEFG:... const missingChars = 39 - (expandedStr.length + ipEnd.length); for (let i = insertOffset; i < missingChars + insertOffset; i++) { - if (i % 5 == 0) { + if (i % 5 === 0) { expandedStr += ":"; continue; }