From 7428f3af26f816476c11f70818ef6b202a8ae044 Mon Sep 17 00:00:00 2001 From: koeneijkemans Date: Sun, 5 Jul 2020 09:52:49 +0200 Subject: [PATCH] Fix assignment to a const error --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 4807432..2ddb04d 100644 --- a/index.js +++ b/index.js @@ -38,15 +38,15 @@ function extractVersion(branch) { const regexp = /([0-9]\.[0-9]\.[0-9])|([0-9]\.[0-9])|([0-9])/g; const matches = branch.match(regexp); - const versions = null; + var versions = null; if (matches) { const version = matches.shift(); - var versionParts = version.split('.'); + const versionParts = version.split('.'); - var major = versionParts[0]; - var minor = versionParts.length >= 2 ? versionParts[1] : null; - var patch = versionParts.length >= 3 ? versionParts[2] : null; + const major = versionParts[0]; + const minor = versionParts.length >= 2 ? versionParts[1] : null; + const patch = versionParts.length >= 3 ? versionParts[2] : null; versions = { version: version,