We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f41258 commit 8632675Copy full SHA for 8632675
src/index.js
@@ -23,7 +23,10 @@ export default class RNFadedScrollView extends Component {
23
onContentSizeChange = (contentWidth, contentHeight) => {
24
// Save the content height in state
25
this.setState({ scrollHeight: contentHeight, scrollWidth: contentWidth });
26
- this.props.onContentSizeChange(contentWidth, contentHeight);
+
27
+ const { onContentSizeChange } = this.props;
28
+ if (onContentSizeChange)
29
+ onContentSizeChange(contentWidth, contentHeight);
30
};
31
32
_onLayout(event) {
0 commit comments