diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx index 203a95431fc13..fbc0199d4b6ad 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx @@ -94,6 +94,7 @@ export function getErrorsForHistogramField( ) { // check if has field of histogram type const column = layer.columns[columnId]; + if (!column) return; const { operationType } = column; const operationDefinition = operationType ? operationDefinitionMap[operationType] : undefined; const fieldNames =