Skip to content

Commit 0cabeb7

Browse files
committed
fix logic error
1 parent df8c9b7 commit 0cabeb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native-gesture-handler/apple/RNGestureHandlerDetector.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ - (void)attachHandlers:(const std::vector<int> &)handlerTags
170170
[_nativeHandlers addObject:@(tag)];
171171
} else {
172172
if (actionType == RNGestureHandlerActionTypeLogicDetector) {
173-
[[handlerManager registry] handlerWithTag:@(tag)].hostDetectorTag = @(self.tag);
174173
[handlerManager attachGestureHandler:@(tag) toViewWithTag:@(viewTag) withActionType:actionType];
175174
} else {
176175
[handlerManager.registry attachHandlerWithTag:@(tag) toView:self withActionType:actionType];
177176
}
178177
[attachedHandlers addObject:@(tag)];
179178
}
179+
[[handlerManager registry] handlerWithTag:@(tag)].hostDetectorTag = @(self.tag);
180180
}
181181
}
182182

@@ -187,7 +187,7 @@ - (void)attachHandlers:(const std::vector<int> &)handlerTags
187187
}
188188

189189
// This covers the case where `NativeViewGestureHandlers` are attached after child views were created.
190-
if (!self.subviews[0]) {
190+
if (self.subviews[0]) {
191191
[self tryAttachNativeHandlersToChildView];
192192
}
193193
}

0 commit comments

Comments
 (0)