From 1203a52222e100ea47067eaa121e5ada99ef83a2 Mon Sep 17 00:00:00 2001 From: Aaron Hu Date: Thu, 2 Jul 2026 11:28:12 +1000 Subject: [PATCH] fix: reset color on view recycle so currentColor does not leak between recycled SVG views on iOS Co-Authored-By: Claude Fable 5 --- apple/Elements/RNSVGSvgView.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apple/Elements/RNSVGSvgView.mm b/apple/Elements/RNSVGSvgView.mm index 030578325..f8430d457 100644 --- a/apple/Elements/RNSVGSvgView.mm +++ b/apple/Elements/RNSVGSvgView.mm @@ -99,15 +99,14 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & } self.align = RCTNSStringFromStringNilIfEmpty(newProps.align); self.meetOrSlice = intToRNSVGVBMOS(newProps.meetOrSlice); - if (RCTUIColorFromSharedColor(newProps.color)) { - self.color = RCTUIColorFromSharedColor(newProps.color); - } + self.color = RCTUIColorFromSharedColor(newProps.color); [super updateProps:props oldProps:oldProps]; } - (void)prepareForRecycle { [super prepareForRecycle]; + _color = nil; _minX = 0; _minY = 0; _vbWidth = 0;