File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
static/app/views/settings/projectGeneralSettings Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import JsonForm from 'sentry/components/forms/jsonForm';
1919import type { FieldValue } from 'sentry/components/forms/model' ;
2020import type { FieldObject } from 'sentry/components/forms/types' ;
2121import Hook from 'sentry/components/hook' ;
22+ import LoadingError from 'sentry/components/loadingError' ;
2223import { removePageFiltersStorage } from 'sentry/components/organizations/pageFilters/persistence' ;
2324import Panel from 'sentry/components/panels/panel' ;
2425import PanelAlert from 'sentry/components/panels/panelAlert' ;
@@ -269,7 +270,7 @@ export function ProjectGeneralSettings({project, onChangeSlug}: Props) {
269270 disabled : ! hasEveryAccess ( [ 'project:write' ] , { organization, project} ) ,
270271 } ;
271272
272- const team = project . teams . length ? project . teams ?. [ 0 ] : undefined ;
273+ const team = project . teams ?. [ 0 ] ;
273274
274275 // XXX: HACK
275276 //
@@ -442,5 +443,9 @@ export default function ProjectGeneralSettingsContainer() {
442443 [ navigate , organization . slug , routes , location ]
443444 ) ;
444445
446+ if ( ! project ?. id ) {
447+ return < LoadingError message = { t ( 'Failed to load project.' ) } /> ;
448+ }
449+
445450 return < ProjectGeneralSettings project = { project } onChangeSlug = { handleChangeSlug } /> ;
446451}
You can’t perform that action at this time.
0 commit comments