From 98ff5cc2ccba2dd465704ada416dce4e6bf87ba6 Mon Sep 17 00:00:00 2001 From: Scott Moore Date: Sun, 4 Aug 2024 13:14:41 -0700 Subject: [PATCH] Update civitai_helper.js Modified regular expression for version to use numeric values, not single character numbers - allowing for versions like "10" not just single characters, fixing compatibility with version 1.10.0. --- javascript/civitai_helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/civitai_helper.js b/javascript/civitai_helper.js index fd37a2c..5a7c88b 100644 --- a/javascript/civitai_helper.js +++ b/javascript/civitai_helper.js @@ -34,9 +34,9 @@ function extract_version(text) { let matches; // for forge if (text[0] == 'f') - matches = text.match(/v[0-9]\.[0-9]\.[0-9]/); + matches = text.match(/v\d+\.\d+\.\d+/); else - matches = text.match(/[0-9]\.[0-9]\.[0-9]/); + matches = text.match(/\d+\.\d+\.\d+/); if (matches === null || matches.length == 0) { return null;