mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
fix: 🐛 better update detection logic
This commit is contained in:
parent
50d9c8f07c
commit
37e3e34441
@ -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 New Issue
Block a user