Skip to content

Commit 50cb780

Browse files
committed
Fix version snafu
Related issue: uBlockOrigin/uBlock-issues#3792
1 parent 52dba41 commit 50cb780

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

platform/common/vapi-background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet');
4848
vAPI.app = {
4949
name: manifest.name.replace(/ dev\w+ build/, ''),
5050
version: (( ) => {
51-
let version = manifest.version;
51+
let version = manifest.version_name || manifest.version;
5252
const match = /(\d+\.\d+\.\d+)(?:\.(\d+))?/.exec(version);
5353
if ( match && match[2] ) {
5454
const v = parseInt(match[2], 10);

platform/common/vapi-common.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ vAPI.webextFlavor = {
166166
soup.add('ipaddress');
167167

168168
// Whether this is a dev build.
169-
if ( /^\d+\.\d+\.\d+\D/.test(browser.runtime.getManifest().version) ) {
169+
const manifest = browser.runtime.getManifest();
170+
const version = manifest.version_name || manifest.version;
171+
if ( /^\d+\.\d+\.\d+\D/.test(version) ) {
170172
soup.add('devbuild');
171173
}
172174

0 commit comments

Comments
 (0)