Skip to content

Commit

Permalink
fix: 修复初始化渲染未完成时headNode NPE问题 (#2479)
Browse files Browse the repository at this point in the history
fix: 修复初始化渲染时headNode NPE问题

Co-authored-by: wuding.why <[email protected]>
  • Loading branch information
wuhaiyang and wuding.why authored Dec 14, 2023
1 parent deb2801 commit 15b11b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/s2-core/src/facet/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
};

1 comment on commit 15b11b1

@vercel
Copy link

@vercel vercel bot commented on 15b11b1 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.