Skip to content

Commit

Permalink
🐛 Fix Affix throws Cannot read property getBoundingClientRect (#21350)
Browse files Browse the repository at this point in the history
close #21348
  • Loading branch information
afc163 committed Feb 12, 2020
1 parent e01755c commit f496141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/affix/index.tsx
Expand Up @@ -227,7 +227,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);
Expand Down

0 comments on commit f496141

Please sign in to comment.