Skip to content

Commit 0e3ad6f

Browse files
author
oatkiller
committed
fixup: getTimeline actually returns TimelineModel | undefined
1 parent 1ad5679 commit 0e3ad6f

File tree

1 file changed

+4
-2
lines changed
  • x-pack/plugins/security_solution/public/common/components/events_viewer

1 file changed

+4
-2
lines changed

x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ const makeMapStateToProps = () => {
150150
const getEvents = timelineSelectors.getEventsByIdSelector();
151151
const getTimeline = timelineSelectors.getTimelineByIdSelector();
152152
const mapStateToProps = (state: State, { id, defaultModel }: OwnProps) => {
153-
const { graphEventId } = getTimeline(state, id);
154153
const input: inputsModel.InputsRange = getInputsTimeline(state);
155154
const events: TimelineModel = getEvents(state, id) ?? defaultModel;
156155
const {
@@ -180,7 +179,10 @@ const makeMapStateToProps = () => {
180179
sort,
181180
showCheckboxes,
182181
// Used to determine whether the footer should show (since it is hidden if the graph is showing.)
183-
graphEventId,
182+
graphEventId: /** `getTimeline` actually returns `TimelineModel | undefined` */ (getTimeline(
183+
state,
184+
id
185+
) as TimelineModel | undefined)?.graphEventId,
184186
};
185187
};
186188
return mapStateToProps;

0 commit comments

Comments
 (0)