Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / uri-js / dist / esnext / uri.js
index 2fb6d713e3a587fb93d94ed3c0fa1e44837055c3..659ce2651cea1d928546bbc296f5f0cb97c07b85 100644 (file)
@@ -270,9 +270,9 @@ function _recomposeAuthority(components, options) {
         //normalize IP hosts, add brackets and escape zone separator for IPv6
         uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]"));
     }
-    if (typeof components.port === "number") {
+    if (typeof components.port === "number" || typeof components.port === "string") {
         uriTokens.push(":");
-        uriTokens.push(components.port.toString(10));
+        uriTokens.push(String(components.port));
     }
     return uriTokens.length ? uriTokens.join("") : undefined;
 }