Skip to content

Commit 91b77d1

Browse files
dkucinskasDEVB\darius.kucinskas
andauthored
Fixes issue were because of debouncing updateInitialDimension is triggered after outerElement is already destroyed. (#170)
Co-authored-by: DEVB\darius.kucinskas <[email protected]>
1 parent 997d517 commit 91b77d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Sticky.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ class Sticky extends Component {
132132
updateInitialDimension (options) {
133133
options = options || {}
134134

135+
if (!this.outerElement || !this.innerElement) {
136+
return;
137+
}
138+
135139
var outerRect = this.outerElement.getBoundingClientRect();
136140
var innerRect = this.innerElement.getBoundingClientRect();
137141

0 commit comments

Comments
 (0)