Skip to content

Commit

Permalink
[Discover] Fix flattening of _source fields of objects (elastic#136473)
Browse files Browse the repository at this point in the history
- when fetching _source nested objects like obj.rootKey.subkey1, object.rootKey.subkey2 were not flattened correctly
  • Loading branch information
dimaanj authored Jul 20, 2022
1 parent c43c827 commit 0c78f8a
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 @@ -92,7 +92,7 @@ export function flattenHit(hit: Hit, indexPattern?: DataView, params?: TabifyDoc
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 0c78f8a

Please sign in to comment.