mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-07-04 17:11:01 -05:00
Fix update message still appearing after updating
This commit is contained in:
parent
88076b7380
commit
48b2f30ffc
|
|
@ -27,9 +27,7 @@ export async function checkUpdates() {
|
|||
try {
|
||||
const data: UpdateCacheData = JSON.parse(await fs.readFile(update_cache_path, 'utf-8'));
|
||||
|
||||
if (data && data.expires_at > Date.now()) {
|
||||
if (data.current_version !== version) return data;
|
||||
|
||||
if (data && data.current_version === version && data.expires_at > Date.now()) {
|
||||
if ('update_available' in data && data.update_available) {
|
||||
console.warn('[nxapi] Update available - current version %s, latest %s',
|
||||
data.current_version, data.latest_version);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user