From 4f061db4cbec75b98d7050937db8add95ef01db3 Mon Sep 17 00:00:00 2001 From: "wuding.why" Date: Thu, 14 Dec 2023 19:08:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=B8=B2=E6=9F=93=E6=97=B6headNode=20NPE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/facet/utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/s2-core/src/facet/utils.ts b/packages/s2-core/src/facet/utils.ts index 09e8e16f0b..4e5c33e430 100644 --- a/packages/s2-core/src/facet/utils.ts +++ b/packages/s2-core/src/facet/utils.ts @@ -565,12 +565,13 @@ export const getFrozenRowCfgPivot = ( enableFrozenFirstRow = !showSeriesNumber; } } + const effectiveFrozenFirstRow = enableFrozenFirstRow && !!headNode; return { - frozenRowCount: enableFrozenFirstRow ? 1 : 0, + frozenRowCount: effectiveFrozenFirstRow ? 1 : 0, frozenColCount: 0, frozenTrailingColCount: 0, frozenTrailingRowCount: 0, enableFrozenFirstRow, - frozenRowHeight: enableFrozenFirstRow ? headNode.height : 0, + frozenRowHeight: effectiveFrozenFirstRow ? headNode.height : 0, }; };