From 53abfe5cef53ba73045f60ca36ecb74b19d0e236 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Mon, 10 Oct 2022 12:35:47 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20make=20Defs=20pass=20invalidate=20higher?= =?UTF-8?q?=20even=20though=20it=20does=20not=20conform=E2=80=A6=20(#1889)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR making Defs pass invalidate higher even though it does not conform to RNSVGContainer. Maybe it should be done another way round, making Defs component implement the protocol, since it does it already by having invalidate method. --- apple/RNSVGNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/RNSVGNode.mm b/apple/RNSVGNode.mm index a399bfe3..f3479be9 100644 --- a/apple/RNSVGNode.mm +++ b/apple/RNSVGNode.mm @@ -71,7 +71,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12; RNSVGView *container = self.superview; // on Fabric, when the child components are added to hierarchy and their props are set, // their superview is not set yet. - if ([container conformsToProtocol:@protocol(RNSVGContainer)]) { + if (container != nil) { [(id)container invalidate]; } [self clearPath];