Fix null handling of getSvgShadowNode in new ancestor creation

This commit is contained in:
Mikael Sand
2018-10-12 00:01:04 +03:00
parent 445780c121
commit a2550c35df
@@ -317,7 +317,9 @@ abstract class VirtualNode extends LayoutShadowNode {
ReactShadowNode parent = getParent();
if (parent instanceof SvgViewShadowNode) {
if (parent == null) {
return null;
} else if (parent instanceof SvgViewShadowNode) {
mSvgShadowNode = (SvgViewShadowNode)parent;
} else if (parent instanceof VirtualNode) {
mSvgShadowNode = ((VirtualNode) parent).getSvgShadowNode();