fix: make Defs pass invalidate higher even though it does not conform… (#1889)

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.
This commit is contained in:
Wojciech Lewicki
2022-10-10 12:35:47 +02:00
committed by GitHub
parent 4aba67cea7
commit 53abfe5cef
+1 -1
View File
@@ -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<RNSVGContainer>)container invalidate];
}
[self clearPath];