Fix version snafu

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3792
This commit is contained in:
Raymond Hill 2025-09-08 08:11:20 -04:00
parent 52dba4116e
commit 50cb780107
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 4 additions and 2 deletions

View file

@ -48,7 +48,7 @@ vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet');
vAPI.app = {
name: manifest.name.replace(/ dev\w+ build/, ''),
version: (( ) => {
let version = manifest.version;
let version = manifest.version_name || manifest.version;
const match = /(\d+\.\d+\.\d+)(?:\.(\d+))?/.exec(version);
if ( match && match[2] ) {
const v = parseInt(match[2], 10);

View file

@ -166,7 +166,9 @@ vAPI.webextFlavor = {
soup.add('ipaddress');
// Whether this is a dev build.
if ( /^\d+\.\d+\.\d+\D/.test(browser.runtime.getManifest().version) ) {
const manifest = browser.runtime.getManifest();
const version = manifest.version_name || manifest.version;
if ( /^\d+\.\d+\.\d+\D/.test(version) ) {
soup.add('devbuild');
}