util: Handle .rc in version comparisons
We somehow missed that the new version scheme include '.rc' when adding the comparison function, whoops. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3130>
This commit is contained in:
parent
b02460fa63
commit
79b0c9c726
@ -294,8 +294,10 @@ function _GNOMEversionToNumber(version) {
|
||||
if (!isNaN(ret))
|
||||
return ret;
|
||||
if (version === 'alpha')
|
||||
return -2;
|
||||
return -3;
|
||||
if (version === 'beta')
|
||||
return -2;
|
||||
if (version === 'rc')
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
v1: '40',
|
||||
v2: '3.38.0',
|
||||
v2: '40.rc',
|
||||
res: 1,
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user