Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rylnd committed Apr 3, 2021
1 parent 168612b commit 8143acd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const mergeTimelineFieldsWithHit = async <T>(
dataFields: readonly string[],
ecsFields: readonly string[]
) => {
if (fieldName != null || dataFields.includes(fieldName)) {
if (fieldName != null) {
const nestedParentPath = getNestedParentPath(fieldName, hit.fields);
if (
nestedParentPath != null ||
Expand Down

0 comments on commit 8143acd

Please sign in to comment.