Skip to content

Commit

Permalink
Check for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Bargs committed Mar 28, 2019
1 parent 8a9f2a9 commit 3787731
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function readFieldCapsResponse(fieldCapsResponse) {
const parentFieldName = field.name.split('.').slice(0, -1).join('.');
const parentFieldCaps = kibanaFormattedCaps.find(caps => caps.name === parentFieldName);

if (!['object', 'nested'].includes(parentFieldCaps.type)) {
if (parentFieldCaps && !['object', 'nested'].includes(parentFieldCaps.type)) {
field.parent = parentFieldName;
field.subType = 'multi';
}
Expand Down

0 comments on commit 3787731

Please sign in to comment.