mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:39:18 +08:00
🐛 Fix Affix throws Cannot read property getBoundingClientRect (#21350)
close #21348
This commit is contained in:
parent
dd16a24426
commit
4db7cbcf43
@ -239,7 +239,7 @@ class Affix extends React.Component<AffixProps, AffixState> {
|
||||
const offsetBottom = this.getOffsetBottom();
|
||||
|
||||
const targetNode = target();
|
||||
if (targetNode) {
|
||||
if (targetNode && this.placeholderNode) {
|
||||
const targetRect = getTargetRect(targetNode);
|
||||
const placeholderReact = getTargetRect(this.placeholderNode);
|
||||
const fixedTop = getFixedTop(placeholderReact, targetRect, offsetTop);
|
||||
|
Loading…
Reference in New Issue
Block a user