mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 16:54:52 +00:00
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:
+1
-1
@@ -71,7 +71,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
|
|||||||
RNSVGView *container = self.superview;
|
RNSVGView *container = self.superview;
|
||||||
// on Fabric, when the child components are added to hierarchy and their props are set,
|
// on Fabric, when the child components are added to hierarchy and their props are set,
|
||||||
// their superview is not set yet.
|
// their superview is not set yet.
|
||||||
if ([container conformsToProtocol:@protocol(RNSVGContainer)]) {
|
if (container != nil) {
|
||||||
[(id<RNSVGContainer>)container invalidate];
|
[(id<RNSVGContainer>)container invalidate];
|
||||||
}
|
}
|
||||||
[self clearPath];
|
[self clearPath];
|
||||||
|
|||||||
Reference in New Issue
Block a user