From 1c9252b0f8aab14320b40627f167d6eb5f044e9f Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Wed, 4 May 2022 11:44:43 +0300 Subject: [PATCH] Fix jest test --- .../indexpattern_datasource/operations/definitions/helpers.tsx | 1 + 1 file changed, 1 insertion(+) 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 =