Skip to content

Commit

Permalink
fix(ios): resolve exception where touchView may be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Jun 6, 2024
1 parent 18bf885 commit 3d20290
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/sdk/base/HippyTouchHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
UIView *touchView = [touch view];
CGPoint locationPoint = [touch locationInView:touchView];
touchView = touchView?:[self.view.window hitTest:locationPoint withEvent:event];
[_touchBeganViews addObject:touchView];
if (touchView) {
[_touchBeganViews addObject:touchView];
}
NSDictionary *result = [self responseViewForAction:@[@"onPressIn", @"onTouchDown", @"onClick", @"onLongClick"] inView:touchView
atPoint:locationPoint];

Expand Down

0 comments on commit 3d20290

Please sign in to comment.