mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
fix: do not remove filter region on recycle (#2488)
# Summary Filter regions were nil as init is not called when view is reused.
This commit is contained in:
@@ -72,7 +72,7 @@ using namespace facebook::react;
|
||||
[super prepareForRecycle];
|
||||
_filterUnits = kRNSVGUnitsObjectBoundingBox;
|
||||
_primitiveUnits = kRNSVGUnitsUserSpaceOnUse;
|
||||
_filterRegion = nil;
|
||||
_filterRegion = [[RNSVGFilterRegion alloc] init];
|
||||
}
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- (void)prepareForRecycle
|
||||
{
|
||||
[super prepareForRecycle];
|
||||
_filterSubregion = nil;
|
||||
_filterSubregion = [[RNSVGFilterRegion alloc] init];
|
||||
_result = nil;
|
||||
}
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user