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:
Jakub Grzywacz
2024-10-15 09:44:31 +02:00
committed by GitHub
parent ba54b15799
commit 768ec5df45
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -16,7 +16,7 @@
- (void)prepareForRecycle
{
[super prepareForRecycle];
_filterSubregion = nil;
_filterSubregion = [[RNSVGFilterRegion alloc] init];
_result = nil;
}
#endif // RCT_NEW_ARCH_ENABLED