Skip to content

Commit

Permalink
Update civitai_helper.js
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
scm6079 authored Aug 4, 2024
1 parent b628255 commit 98ff5cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/civitai_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98ff5cc

Please sign in to comment.