Skip to content

Commit e24f2ac

Browse files
committed
Fix: parse string to float to compare versions
1 parent d4e9b91 commit e24f2ac

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
],
1010
"url": "https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager",
1111
"uuid": "another-window-session-manager@gmail.com",
12-
"version": 12
12+
"version": 13
1313
}

utils/gnomeVersion.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
const Config = imports.misc.config;
22

3-
const GNOME_VERSION = Config.PACKAGE_VERSION;
3+
// '41.beta' => 41
4+
// '41.4' => 41.4
5+
// '3.38.beta' => 3.38
6+
const GNOME_VERSION = parseFloat(Config.PACKAGE_VERSION);
47

58

69
function isOlderThan42() {
7-
return GNOME_VERSION < '42';
10+
return GNOME_VERSION < 42;
811
}
912

1013

0 commit comments

Comments
 (0)