1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 11:36:46 +00:00

feat: add VERSION_CHECK_DISABLED environment variable (#1254)

This commit is contained in:
Jasper Bernhardt
2026-01-19 00:28:24 +01:00
committed by GitHub
parent 53ef61a3e5
commit 0978a89fcc
3 changed files with 13 additions and 2 deletions

View File

@@ -10,8 +10,13 @@ export const load: LayoutLoad = async () => {
let isUpToDate = true;
try {
newestVersion = await versionService.getNewestVersion();
isUpToDate = newestVersion === currentVersion;
} catch {}
// If newestVersion is empty, it means the check is disabled or failed.
// In this case, we assume the version is up to date.
isUpToDate = newestVersion === '' || newestVersion === currentVersion;
} catch {
// If the request fails, assume up-to-date to avoid showing a warning.
isUpToDate = true;
}
const versionInformation: AppVersionInformation = {
currentVersion: versionService.getCurrentVersion(),