mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
fix: 🐛 better update detection logic
This commit is contained in:
parent
50d9c8f07c
commit
37e3e34441
2 changed files with 6 additions and 6 deletions
|
@ -72,9 +72,9 @@ os.api('admin/abuse-user-reports', {
|
|||
|
||||
if (defaultStore.state.showAdminUpdates) {
|
||||
os.api('latest-version').then(res => {
|
||||
const cleanRes = res?.tag_name.replace(/[^0-9]/g, '');
|
||||
const cleanVersion = version.replace(/[^0-9]/g, '');
|
||||
if (cleanRes !== cleanVersion) {
|
||||
const cleanRes = parseInt(res?.tag_name.replace(/[^0-9]/g, ''));
|
||||
const cleanVersion = parseInt(version.replace(/[^0-9]/g, ''));
|
||||
if (cleanRes > cleanVersion) {
|
||||
updateAvailable = true;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -108,9 +108,9 @@ if ($i?.isAdmin) {
|
|||
|
||||
if (defaultStore.state.showAdminUpdates) {
|
||||
os.api('latest-version').then(res => {
|
||||
const cleanRes = res?.tag_name.replace(/[^0-9]/g, '');
|
||||
const cleanVersion = version.replace(/[^0-9]/g, '');
|
||||
if (cleanRes !== cleanVersion) {
|
||||
const cleanRes = parseInt(res?.tag_name.replace(/[^0-9]/g, ''));
|
||||
const cleanVersion = parseInt(version.replace(/[^0-9]/g, ''));
|
||||
if (cleanRes > cleanVersion) {
|
||||
updateAvailable = true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue