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
This commit is contained in:
David Vacca 2020-05-06 16:33:23 -07:00 коммит произвёл Facebook GitHub Bot
Родитель ff0c62504b
Коммит 5c48c94f8c
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -805,7 +805,7 @@ public class UIImplementation {
ReactShadowNode node, ReactShadowNode ancestor, int[] outputBuffer) {
int offsetX = 0;
int offsetY = 0;
if (node != ancestor) {
if (node != ancestor && !node.isVirtual()) {
offsetX = Math.round(node.getLayoutX());
offsetY = Math.round(node.getLayoutY());
ReactShadowNode current = node.getParent();