FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: NewsletterSignup crashes on undefined signupSources by sentry[bot] · Pull Request #1188 · TanStack/tanstack.com · GitHub

fix: NewsletterSignup crashes on undefined signupSources - #1188

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/newsletter-signup-optional-chain
Open

fix: NewsletterSignup crashes on undefined signupSources#1188
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/newsletter-signup-optional-chain

Conversation

sentry Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Addresses a TypeError in the NewsletterSignup component where user?.signupSources.includes('newsletter') would crash if user was defined but user.signupSources was undefined. This happened for users whose accounts might not have the signupSources field initialized.

The fix adds optional chaining (?.) to signupSources, changing the expression to user?.signupSources?.includes('newsletter') ?? false. This ensures that if signupSources is undefined, the expression safely short-circuits without throwing an error, preventing the component from crashing.

Fixes TANSTACK-COM-4W6

This PR was automatically generated by Sentry. You can adjust this setting at any time.

cloudflare-workers-and-pages Bot commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown

Deploying with    Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 937bc92 Commit Preview URL

Branch Preview URL
Aug 28 2026, 11:02 PM

tannerlinsley added the source-audit Tracked by the automated source audit label Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL