From bcb01ba48e8bd1883218b00cf4c19c62dd25f87f Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <53386582+Corbe30@users.noreply.github.com> Date: Mon, 16 Dec 2024 06:50:12 +0000 Subject: [PATCH] fixed: handle undefined --- packages/core/src/modules/formula.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/modules/formula.ts b/packages/core/src/modules/formula.ts index 9e7feef4..852d3823 100644 --- a/packages/core/src/modules/formula.ts +++ b/packages/core/src/modules/formula.ts @@ -1185,9 +1185,10 @@ export function groupValuesRefresh(ctx: Context) { export function setFormulaCellInfoMap( ctx: Context, - calcChains: any, + calcChains?: any[], data?: CellMatrix ) { + if (_.isNil(calcChains)) return; for (let i = 0; i < calcChains.length; i += 1) { const formulaCell = calcChains[i]; setFormulaCellInfo(ctx, formulaCell, data);