mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 23:54:53 +00:00
Fix null handling of getSvgShadowNode in new ancestor creation
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user