Skip to content

fix(analytics): make the FF variable optional - #1139

Merged
siiick merged 1 commit into
mainfrom
fix/analytics-env-var
Sep 26, 2025
Merged

fix(analytics): make the FF variable optional#1139
siiick merged 1 commit into
mainfrom
fix/analytics-env-var

Conversation

@siiick

@siiick siiick commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on October 23

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}

if (!getServerEnv('ANALYTICS_V2').split(',').includes(user.organizationId)) {
if (!getServerEnv('ANALYTICS_V2')?.split(',').includes(user.organizationId)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incomplete Optional Chaining Causes TypeError

The optional chaining for getServerEnv('ANALYTICS_V2') is incomplete. If the function returns null or undefined, ?.split(',') evaluates to undefined. Calling .includes() on undefined then throws a TypeError.

Fix in Cursor Fix in Web

@siiick
siiick merged commit 9ce59ed into main Sep 26, 2025
6 checks passed
@siiick
siiick deleted the fix/analytics-env-var branch September 26, 2025 11:49
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.

2 participants