fix: 🐛 better update detection logic
This commit is contained in:
parent
83fe5ca701
commit
8a8e7be076
|
@ -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