Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ const reducer = createReducer(
on(experimentsAction.actionUpsertExperiment, experimentsAction.actionGetExperimentById, (state) => ({
...state,
isLoadingExperiment: true,
// if we don't have a totalExperiments count yet (no paginated call with > 1 has occured yet),
// set it to 1 because we are loading at least one experiment so that nav to root page will not show empty template
totalExperiments: state.totalExperiments ? state.totalExperiments : 1,
// If the total count is unknown, assume at least one experiment is loading so the root page skips the empty state.
// Preserve 0 because it means the backend already confirmed an empty list.
totalExperiments: state.totalExperiments ?? 1,
Comment thread
zackcl marked this conversation as resolved.
})),
on(experimentsAction.actionGetExperimentByIdSuccess, (state, { experiment }) => {
// Upsert experiment: update if exists, add if not (for direct navigation)
Expand Down
Loading