check for sticky ref before update
This commit is contained in:
parent
c7d3de0fc8
commit
63e916ee2a
@ -28,7 +28,7 @@ export class StickyContext extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateStickies = (ref) => {
|
updateStickies = (ref) => {
|
||||||
const stickyContextTop = ref.getBoundingClientRect().top;
|
const stickyContextTop = ref && ref.getBoundingClientRect().top;
|
||||||
this.subscriptions.forEach((fn) => { fn(stickyContextTop); });
|
this.subscriptions.forEach((fn) => { fn(stickyContextTop); });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user