Skip to content

Commit 5c48c94

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Fix measureLayout function for Virtual Nodes
Summary: This diff fixes a NullPointerException thrown when calling measureLayout function on a virtual node. changelog: [Android] Fix measureLayout function for VirtualTexts Reviewed By: JoshuaGross Differential Revision: D21435030 fbshipit-source-id: aba6d81f333464e49d2d769b111842e7ae8ce769
1 parent ff0c625 commit 5c48c94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ private void measureLayoutRelativeToVerifiedAncestor(
805805
ReactShadowNode node, ReactShadowNode ancestor, int[] outputBuffer) {
806806
int offsetX = 0;
807807
int offsetY = 0;
808-
if (node != ancestor) {
808+
if (node != ancestor && !node.isVirtual()) {
809809
offsetX = Math.round(node.getLayoutX());
810810
offsetY = Math.round(node.getLayoutY());
811811
ReactShadowNode current = node.getParent();

0 commit comments

Comments
 (0)