Skip to content

Fix null environments access in getEnvironmentIdFromKey#7513

Open
Manoj-M19 wants to merge 1 commit into
Flagsmith:mainfrom
Manoj-M19:fix/null-environment-guard
Open

Fix null environments access in getEnvironmentIdFromKey#7513
Manoj-M19 wants to merge 1 commit into
Flagsmith:mainfrom
Manoj-M19:fix/null-environment-guard

Conversation

@Manoj-M19
Copy link
Copy Markdown

Fixes a runtime error caused by store.model.environments being accessed before project data is fully loaded.

Adds a guard in getEnvironmentIdFromKey to safely handle cases where store.model or environments are temporarily null during async loading flows.

Issue

Sentry Issue: FLAGSMITH-FRONTEND-4N3

Testing
Ran the application locally
Refreshed and navigated between routes to verify no runtime crash occurs
Confirmed the application still loads correctly

@Manoj-M19 Manoj-M19 requested a review from a team as a code owner May 13, 2026 20:38
@Manoj-M19 Manoj-M19 requested review from Zaimwa9 and removed request for a team May 13, 2026 20:38
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

@Manoj-M19 is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant