mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Validate version number better
This commit is contained in:
parent
4c8aeedf02
commit
b8c7a6532f
1 changed files with 3 additions and 1 deletions
|
@ -69,7 +69,9 @@ os.api('admin/abuse-user-reports', {
|
|||
});
|
||||
|
||||
os.api('latest-version').then(res => {
|
||||
if (res?.tag_name !== version) {
|
||||
const cleanRes = parseInt(res?.tag_name.replace(/[^0-9]/g, ''), 10);
|
||||
const cleanVersion = parseInt(version.replace(/[^0-9]/g, ''), 10);
|
||||
if (cleanRes > cleanVersion) {
|
||||
updateAvailable = true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue