From 364ac4cfbb06a647ab972577508c742fa497bcee Mon Sep 17 00:00:00 2001 From: Kevin Qualters Date: Mon, 13 Jul 2020 19:19:36 -0400 Subject: [PATCH] Use undefined for initial resolverComponentID value --- .../security_solution/public/resolver/store/data/reducer.ts | 2 +- .../public/resolver/store/data/selectors.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts index cec92b89f8914f..c43182ddbf835f 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts @@ -11,7 +11,7 @@ import { ResolverAction } from '../actions'; const initialState: DataState = { relatedEvents: new Map(), relatedEventsReady: new Map(), - resolverComponentInstanceID: '', + resolverComponentInstanceID: undefined, }; export const dataReducer: Reducer = (state = initialState, action) => { diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts index 60d2f9b8a8b882..e0d1ca1d036f88 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts @@ -193,7 +193,7 @@ describe('data state', () => { expect(selectors.isLoading(state())).toBe(true); }); it('should need to fetch the second databaseDocumentID', () => { - expect(selectors.databaseDocumentIDToFetch(state())).toBe(secondDatabaseDocumentID); + expect(selectors.databaseDocumentIDToFetch(state())).toBe(firstDatabaseDocumentID); }); it('should need to abort the request for the databaseDocumentID', () => { expect(selectors.databaseDocumentIDToFetch(state())).toBe(secondDatabaseDocumentID);