Skip to content

Commit

Permalink
fix: #604
Browse files Browse the repository at this point in the history
  • Loading branch information
yang authored and yang committed Apr 14, 2021
1 parent bac643f commit bb4fd3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/affix/Affix.tsx
Expand Up @@ -66,7 +66,10 @@ export default class Affix extends PureComponent<AffixProps, AffixStates> {
const { onChange } = this.props;
const { affixed } = this.state;
const target = this.savePlaceholderNode.current!;
const { top, width, height } = target.getBoundingClientRect()!;
if (!target) {
return false;
}
const { top, width, height } = target?.getBoundingClientRect();

this.saveFixedNodeTop = top;

Expand Down

0 comments on commit bb4fd3c

Please sign in to comment.