diff --git a/lib/installer.js b/lib/installer.js index 928e6b2..3948bea 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -66,7 +66,7 @@ function getMaven(version, mirror) { } exports.getMaven = getMaven; function get_server_url(mirror) { - if (mirror && mirror.indexOf("http") == 0) { + if (mirror && (mirror.indexOf("http") === 0)) { return mirror; } switch (mirror) { diff --git a/src/installer.ts b/src/installer.ts index 955c444..e7a836e 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -32,7 +32,7 @@ export async function getMaven(version: string, mirror: string) { } function get_server_url(mirror: string) { - if (mirror && mirror.indexOf("http") == 0) { + if (mirror && (mirror.indexOf("http") === 0)) { return mirror; } switch (mirror) {