From e306b575efd640084c35389665aab3e5a648ca76 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Sat, 23 Nov 2024 12:54:42 +1100 Subject: [PATCH] [8.16] [Security Solution] Fix an error with nested fields being treated as keyword (#201473) (#201482) # Backport This will backport the following commits from `main` to `8.16`: - [[Security Solution] Fix an error with nested fields being treated as keyword (#201473)](https://github.com/elastic/kibana/pull/201473) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Kevin Qualters <56408403+kqualters-elastic@users.noreply.github.com> --- .../timeline/factory/helpers/format_timeline_data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/helpers/format_timeline_data.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/helpers/format_timeline_data.ts index 485ec64badd5c..481b74a802fec 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/helpers/format_timeline_data.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/helpers/format_timeline_data.ts @@ -34,7 +34,7 @@ const createBaseTimelineEdges = (): TimelineEdges => ({ function deepMerge(target: EventSource, source: EventSource) { for (const key in source) { - if (source[key] instanceof Object && key in target) { + if (source && source[key] instanceof Object && target && target[key] instanceof Object) { deepMerge(target[key], source[key]); } else { target[key] = source[key];