Browse Source

🐛 Fix Affix throws Cannot read property getBoundingClientRect (#21350)

close #21348
pull/21378/head
偏右 5 years ago
committed by afc163
parent
commit
4db7cbcf43
  1. 2
      components/affix/index.tsx

2
components/affix/index.tsx

@ -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…
Cancel
Save