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, }; };