Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@ export const MeasureElement: React.FC<MeasureElementProps> = (props): MeasuringE
};

const measureSelf = (): void => {
const node: number = findNodeHandle(ref.current);
UIManager.measureInWindow(node, onUIManagerMeasure);
try {
const node: number = findNodeHandle(ref.current);
UIManager.measureInWindow(node, onUIManagerMeasure);
} catch (error) {
// measureInWindow can throw an exception if the UI manager isn't read yet.
// Try again with a short delay
setTimeout(measureSelf, 100);
}
};

if (props.force) {
Expand Down