From aab52fc0b7e4dfb168bc06facb44c949f415e88e Mon Sep 17 00:00:00 2001 From: Chris Henderson Date: Fri, 13 Jun 2025 00:58:17 -0400 Subject: [PATCH] fix: use boolValue for hasPressListener prop --- ios/RNMBX/RNMBXVectorSourceComponentView.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/RNMBX/RNMBXVectorSourceComponentView.mm b/ios/RNMBX/RNMBXVectorSourceComponentView.mm index 6fa2cb08db..985a524ad2 100644 --- a/ios/RNMBX/RNMBXVectorSourceComponentView.mm +++ b/ios/RNMBX/RNMBXVectorSourceComponentView.mm @@ -40,7 +40,7 @@ - (instancetype)initWithFrame:(CGRect)frame - (void)prepareView { _view = [[RNMBXVectorSource alloc] init]; - + // capture weak self reference to prevent retain cycle __weak __typeof__(self) weakSelf = self; @@ -124,13 +124,13 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & } id hasPressListener = RNMBXConvertFollyDynamicToId(newProps.hasPressListener); if (hasPressListener != nil) { - _view.hasPressListener = hasPressListener; + _view.hasPressListener = [hasPressListener boolValue]; } id hitbox = RNMBXConvertFollyDynamicToId(newProps.hitbox); if (hitbox != nil) { _view.hitbox = hitbox; } - + [super updateProps:props oldProps:oldProps]; }