diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx index ff71608ea840d..ad082d94ddcc3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx @@ -55,8 +55,8 @@ export interface QueryBarTimelineComponentProps { export const TIMELINE_FILTER_DROP_AREA = 'timeline-filter-drop-area'; -const getNonDropAreaFilters = (filters: Filter[]) => - filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA); +const getNonDropAreaFilters = (filters: Filter[] | undefined) => + filters ? filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA) : filters; export const QueryBarTimeline = memo( ({