File tree Expand file tree Collapse file tree
packages/frontend/projects/upgrade/src/app/core/experiments/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ const reducer = createReducer(
9494 on ( experimentsAction . actionUpsertExperiment , experimentsAction . actionGetExperimentById , ( state ) => ( {
9595 ...state ,
9696 isLoadingExperiment : true ,
97- // if we don't have a totalExperiments count yet (no paginated call with > 1 has occured yet),
98- // set it to 1 because we are loading at least one experiment so that nav to root page will not show empty template
99- totalExperiments : state . totalExperiments ? state . totalExperiments : 1 ,
97+ // If the total count is unknown, assume at least one experiment is loading so the root page skips the empty state.
98+ // Preserve 0 because it means the backend already confirmed an empty list.
99+ totalExperiments : state . totalExperiments ?? 1 ,
100100 } ) ) ,
101101 on ( experimentsAction . actionGetExperimentByIdSuccess , ( state , { experiment } ) => {
102102 // Upsert experiment: update if exists, add if not (for direct navigation)
You can’t perform that action at this time.
0 commit comments