Skip to content

fix: handle null projects array in useOwnerOptions #89522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seer-by-sentry[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated by Autofix 🤖

This fix was triggered by Evan Purkhiser.

Fixes JAVASCRIPT-2VEP. The issue was that: useOwnerOptions's unsafe cast to DetailedTeam[] caused team.projects.some() to fail when team.projects was undefined due to a type mismatch.

  • Added a nullish coalescing operator to handle cases where team.projects is null or undefined.
  • This prevents errors when team.projects is null and ensures the logic correctly determines if a team is disabled.

If you have any questions or feedback for the Sentry team about this fix, please email autofix@sentry.io with the Run ID: 15009.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 14, 2025
@ryan953 ryan953 marked this pull request as ready for review April 14, 2025 18:46
@ryan953 ryan953 requested a review from a team April 14, 2025 18:46
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant