I'm trying to patch a library. It has the following piece of code:
const { scrollView } = this.state;
await this.state.currentStep.wrapper.measureLayout(
findNodeHandle(scrollView), (x, y, w, h) => {
// do something
});
This works fine on Android. However, on iOS, if currentStep.wrapper (a React Element) is not inside the scrollview, the app crashes with the following error:
This error cannot be catched. I need to check if the node is a descendant of the scrollview before doing measureLayout() to prevent the crash. Is it possible?
I'm using (react 17.0.2), and (react-native 0.66.3).
