🪲 Fix #118 (again)

This commit is contained in:
Simon Schneegans
2022-03-29 11:53:54 +02:00
parent 6f5bcc6681
commit 0cf53c5a5d
+11 -3
View File
@@ -15,10 +15,18 @@
const {Gtk} = imports.gi; const {Gtk} = imports.gi;
// Returns the given argument, except for "alpha" and "beta". In these cases -2 and -1 are // Returns the given argument, except for "alpha", "beta", and "rc". In these cases -3,
// returned respectively. // -2, and -1 are returned respectively.
function toNumericVersion(x) { function toNumericVersion(x) {
return x == 'alpha' ? -2 : x == 'beta' ? -1 : x; switch (x) {
case 'alpha':
return -3;
case 'beta':
return -2;
case 'rc':
return -1;
}
return x;
} }
const Config = imports.misc.config; const Config = imports.misc.config;