diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index baefe9d0ac..736b40b12f 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -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; } }); diff --git a/packages/client/src/ui/_common_/navbar.vue b/packages/client/src/ui/_common_/navbar.vue index 25a26d3bbb..c44c766b3c 100644 --- a/packages/client/src/ui/_common_/navbar.vue +++ b/packages/client/src/ui/_common_/navbar.vue @@ -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; } });