From c35355f01a4ccb108fac5f53ff38c23c1f23c03c Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Fri, 7 Jun 2024 17:07:14 +0200 Subject: [PATCH] Update githubVersion.js --- src/main/resources/static/js/githubVersion.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/js/githubVersion.js b/src/main/resources/static/js/githubVersion.js index bab142775..0fa2f361b 100644 --- a/src/main/resources/static/js/githubVersion.js +++ b/src/main/resources/static/js/githubVersion.js @@ -40,7 +40,8 @@ async function getCurrentVersionFromBypass() { const response = await fetch(url); if (response.status === 200) { const text = await response.text(); - const match = text.match(/version\s*=\s*['"](\d+\.\d+\.\d+)['"]/); + const versionRegex = /version\s*=\s*['"](\d+\.\d+\.\d+)['"]/; + const match = versionRegex.exec(text); if (match) { return match[1]; }