diff --git a/src/utils/global.ts b/src/utils/global.ts index b976e16..38b5b71 100644 --- a/src/utils/global.ts +++ b/src/utils/global.ts @@ -1,6 +1,6 @@ import { UserAgent } from "./user-agent"; -export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION; +export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION!; export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud'; export const AppInterface = window.AppInterface; diff --git a/src/utils/utils.ts b/src/utils/utils.ts index f91b7c9..382e2fe 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -7,6 +7,11 @@ import { Translations } from "./translation"; * Check for update */ export function checkForUpdate() { + // Don't check update for beta version + if (SCRIPT_VERSION.includes('beta')) { + return; + } + const CHECK_INTERVAL_SECONDS = 2 * 3600; // check every 2 hours const currentVersion = getPref(PrefKey.CURRENT_VERSION);