Skip to content

Commit b5d3470

Browse files
committed
Fix settings app variant fallback to match app.config resolution
1 parent 810cf3f commit b5d3470

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/mobile/src/features/settings/SettingsRouteScreen.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ function AppSettingsSection() {
425425
const icon = useThemeColor("--color-icon");
426426

427427
const version = Constants.expoConfig?.version ?? "0.0.0";
428-
const variant = (Constants.expoConfig?.extra?.appVariant as string | undefined) ?? "development";
428+
// app.config.ts resolves unknown/missing APP_VARIANT to "production", so a
429+
// missing value here must not be mislabeled as a development build.
430+
const rawVariant = Constants.expoConfig?.extra?.appVariant;
431+
const variant = typeof rawVariant === "string" ? rawVariant : "production";
429432
const variantLabel = variant === "production" ? "" : capitalize(variant);
430433
const versionLabel = variantLabel ? `${version} · ${variantLabel}` : version;
431434
// Which JS is actually running: the bundle shipped in the binary, or an OTA

0 commit comments

Comments
 (0)