Skip to content

Commit

Permalink
[7.17] [Discover] Fix flattening of _source fields of objects (#136473)…
Browse files Browse the repository at this point in the history
… (#137040)

* [Discover] Fix flattening of _source fields of objects (#136473)

- when fetching _source nested objects like obj.rootKey.subkey1, object.rootKey.subkey2 were not flattened correctly

(cherry picked from commit 0c78f8a)

# Conflicts:
#	x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/download_csv_dashboard.snap

* [Discover] update snapshot
  • Loading branch information
dimaanj authored Jul 25, 2022
1 parent 21e94e1 commit 0732077
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/plugins/data/common/search/tabify/tabify_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function flattenHit(hit: Hit, indexPattern?: IndexPattern, params?: Tabif
continue;
}

const hasValidMapping = field?.type !== 'conflict';
const hasValidMapping = field && field.type !== 'conflict';
const isValue = !isPlainObject(val);

if (hasValidMapping || isValue) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0732077

Please sign in to comment.