File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/react-native-gesture-handler/src/web Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -407,6 +407,9 @@ export default abstract class GestureHandler implements IGestureHandler {
407
407
} ;
408
408
409
409
private transformEventData ( newState : State , oldState : State ) : ResultEvent {
410
+ if ( ! this . viewRef ) {
411
+ throw new Error ( 'Cannot handle event when target is null' ) ;
412
+ }
410
413
return {
411
414
nativeEvent : {
412
415
numberOfPointers : this . tracker . trackedPointersCount ,
@@ -416,7 +419,7 @@ export default abstract class GestureHandler implements IGestureHandler {
416
419
) ,
417
420
...this . transformNativeEvent ( ) ,
418
421
handlerTag : this . handlerTag ,
419
- target : this . viewRef ! ,
422
+ target : this . viewRef ,
420
423
oldState : newState !== oldState ? oldState : undefined ,
421
424
pointerType : this . pointerType ,
422
425
} ,
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ export class GestureHandlerWebDelegate
70
70
touchAction : '' ,
71
71
} ;
72
72
73
+ this . eventManagers . forEach ( ( manager ) => {
74
+ manager . unregisterListeners ( ) ;
75
+ } ) ;
73
76
this . eventManagers = [ ] ;
74
77
}
75
78
You can’t perform that action at this time.
0 commit comments