fix version parsing in 91b0ac5b3f

This commit is contained in:
Raymond Hill 2018-05-20 08:12:09 -04:00
parent 19518a6269
commit 3b61ef51b0
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -67,7 +67,7 @@ var noopFunc = function(){};
vAPI.app = (function() {
let version = manifest.version;
let match = /(\d+\.\d+\.\d+)(?:\.(\d+))?/.exec(version);
if ( match !== null ) {
if ( match && match[2] ) {
let v = parseInt(match[2], 10);
version = match[1] + (v < 100 ? 'b' + v : 'rc' + (v - 100));
}