diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index d292341ec..ff6ffd1e1 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -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); diff --git a/platform/common/vapi-common.js b/platform/common/vapi-common.js index 1402f4d7a..65e0c93c5 100644 --- a/platform/common/vapi-common.js +++ b/platform/common/vapi-common.js @@ -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'); }