Validate version number better
This commit is contained in:
parent
4c9dabe7b8
commit
b5b5e80c10
|
@ -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…
Reference in New Issue