File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
static/app/views/dashboards/components Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,22 @@ export function PrebuiltDashboardOnboardingGate({
4444 return children ;
4545 }
4646
47+ const selectedProjects = getSelectedProjectList (
48+ pageFilters . selection . projects ,
49+ projects
50+ ) ;
51+ const hasRequiredProjectFlagData =
52+ onboarding . requiredProjectFlags ?. some ( flag =>
53+ selectedProjects . some ( p => p [ flag ] === true )
54+ ) ?? false ;
55+
4756 // If the dashboard uses module-specific onboarding, check whether
4857 // module-specific data is available
4958 if ( onboarding . type === 'module' ) {
59+ if ( hasRequiredProjectFlagData ) {
60+ return children ;
61+ }
62+
5063 if ( ! hasAnySpanData ) {
5164 return (
5265 < ModuleLayout . Full >
@@ -66,16 +79,7 @@ export function PrebuiltDashboardOnboardingGate({
6679 return children ;
6780 }
6881
69- const selectedProjects = getSelectedProjectList (
70- pageFilters . selection . projects ,
71- projects
72- ) ;
73-
74- const hasData = onboarding . requiredProjectFlags . some ( flag =>
75- selectedProjects . some ( p => p [ flag ] === true )
76- ) ;
77-
78- if ( hasData ) {
82+ if ( hasRequiredProjectFlagData ) {
7983 return children ;
8084 }
8185
You can’t perform that action at this time.
0 commit comments