From 8143acdf440d41d0bdf6a97deedad19534077169 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Fri, 2 Apr 2021 21:37:21 -0500 Subject: [PATCH] Remove unnecessary condition If fieldName is null or undefined, there is no reason to search for it in dataFields. Looking through the git history this looks to be dead code as a result of refactoring, as opposed to a legitimate bugfix, so I'm removing it. --- .../search_strategy/timeline/factory/events/all/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/helpers.ts index 0b7310ace87ad..e569ba64a6f14 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/helpers.ts @@ -134,7 +134,7 @@ const mergeTimelineFieldsWithHit = async ( dataFields: readonly string[], ecsFields: readonly string[] ) => { - if (fieldName != null || dataFields.includes(fieldName)) { + if (fieldName != null) { const nestedParentPath = getNestedParentPath(fieldName, hit.fields); if ( nestedParentPath != null ||