Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion static/app/views/settings/projectGeneralSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function ProjectGeneralSettings({project, onChangeSlug}: Props) {
disabled: !hasEveryAccess(['project:write'], {organization, project}),
};

const team = project.teams.length ? project.teams?.[0] : undefined;
const team = project.teams?.[0];

// XXX: HACK
//
Expand Down Expand Up @@ -442,5 +442,9 @@ export default function ProjectGeneralSettingsContainer() {
[navigate, organization.slug, routes, location]
);

if (!project?.id) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I considered instead modifying ProjectContext to update the project state only if the project ID still exists in the ProjectsStore (and therefore hasn't been deleted), but I don't want to set the pattern that those two can be kept out of date with each other. So I decided to just add a defensive check here since this bug is scoped only to project deletion.

return null;
}

return <ProjectGeneralSettings project={project} onChangeSlug={handleChangeSlug} />;
}
Loading