Skip to content

fix(env): read correct env var for bottom BMI banner ad slot#237

Open
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/bmi-bottom-adslot-wrong-env-var
Open

fix(env): read correct env var for bottom BMI banner ad slot#237
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/bmi-bottom-adslot-wrong-env-var

Conversation

@evan188199-tech

Copy link
Copy Markdown

What

NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT was mapped to the TOP env var instead of the BOTTOM one — a copy/paste error in src/env.ts.

// line 163-164
NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT,
NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT,  // ← reads TOP, not BOTTOM

Impact

Setting NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT has no effect — the bottom BMI ad slot always gets the top slot's value, so a publisher configuring different ads for top vs. bottom sees the same ad in both positions.

Fix

One line — map it to the correct env var:

NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT,

I scanned the rest of experimental__runtimeEnv for the same key/value mismatch pattern — this was the only one.

Fixes #236.

NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT was mapped to
process.env.NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT (copy/paste), so setting the
bottom slot had no effect and both BMI ad slots showed the top slot's ad.

Fixes Snouzy#236
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Workoutcool Team Team on Vercel.

A member of the Team first needs to authorize it.

@evan188199-tech

Copy link
Copy Markdown
Author

此 PR 由 GLM-5.2 修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT reads the TOP env var (copy/paste)

1 participant