Skip to content

Commit

Permalink
Fixes issue were because of debouncing updateInitialDimension is trig…
Browse files Browse the repository at this point in the history
…gered after outerElement is already destroyed. (#170)

Co-authored-by: DEVB\darius.kucinskas <[email protected]>
  • Loading branch information
dkucinskas and DEVB\darius.kucinskas authored Jun 5, 2020
1 parent 997d517 commit 91b77d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Sticky.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ class Sticky extends Component {
updateInitialDimension (options) {
options = options || {}

if (!this.outerElement || !this.innerElement) {
return;
}

var outerRect = this.outerElement.getBoundingClientRect();
var innerRect = this.innerElement.getBoundingClientRect();

Expand Down

0 comments on commit 91b77d1

Please sign in to comment.