Skip to content

Commit 861aeeb

Browse files
committed
check ref to fix crash on web
1 parent 5feef59 commit 861aeeb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ class ParallaxScrollView extends Component {
338338
_renderFooterSpacer({ contentBackgroundColor }) {
339339
return (
340340
<View
341-
ref={ref => (this._footerComponent = ref)}
341+
ref={ref => {
342+
if (ref) {
343+
this._footerComponent = ref;
344+
}
345+
}}
342346
style={{ backgroundColor: contentBackgroundColor }}
343347
/>
344348
)

0 commit comments

Comments
 (0)