From 569b306e5e04454ffade49bdafacf1d69efbaee0 Mon Sep 17 00:00:00 2001 From: Ridham Shah <49234788+RidhamShah@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:09:57 +0530 Subject: [PATCH] Fix delete exclusion list throwing error (#1922) Co-authored-by: RidhamShah Co-authored-by: Ben Blanchard --- .../src/app/core/feature-flags/store/feature-flags.reducer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts index fb94db058f..faa521f694 100644 --- a/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts +++ b/frontend/projects/upgrade/src/app/core/feature-flags/store/feature-flags.reducer.ts @@ -180,7 +180,7 @@ const reducer = createReducer( on(FeatureFlagsActions.actionDeleteFeatureFlagInclusionListSuccess, (state, { segmentId }) => { const updatedState = { ...state, isLoadingUpsertPrivateSegmentList: false }; const flagId = Object.keys(state.entities).find((id) => - state.entities[id].featureFlagSegmentInclusion?.some((inclusion) => inclusion.segment.id === segmentId) + state.entities[id].featureFlagSegmentInclusion?.some((inclusion) => inclusion.segment?.id === segmentId) ); if (flagId) {