File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
packages/react-native-gesture-handler/src/web/handlers Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -352,10 +352,14 @@ export default abstract class GestureHandler implements IGestureHandler {
352
352
}
353
353
354
354
public sendTouchEvent ( event : AdaptedEvent ) : void {
355
- if ( ! this . enabled || ! this . propsRef ) {
355
+ if ( ! this . enabled ) {
356
356
return ;
357
357
}
358
-
358
+ if ( ! this . propsRef ) {
359
+ throw new Error (
360
+ tagMessage ( 'Cannot handle event when component props are null' )
361
+ ) ;
362
+ }
359
363
const { onGestureHandlerEvent, onGestureHandlerTouchEvent } : PropsRef =
360
364
this . propsRef . current ;
361
365
@@ -380,7 +384,9 @@ export default abstract class GestureHandler implements IGestureHandler {
380
384
381
385
public sendEvent = ( newState : State , oldState : State ) : void => {
382
386
if ( ! this . propsRef ) {
383
- return ;
387
+ throw new Error (
388
+ tagMessage ( 'Cannot handle event when component props are null' )
389
+ ) ;
384
390
}
385
391
const {
386
392
onGestureHandlerEvent,
@@ -536,7 +542,9 @@ export default abstract class GestureHandler implements IGestureHandler {
536
542
537
543
private cancelTouches ( ) : void {
538
544
if ( ! this . propsRef ) {
539
- return ;
545
+ throw new Error (
546
+ tagMessage ( 'Cannot handle event when component props are null' )
547
+ ) ;
540
548
}
541
549
const rect = this . delegate . measureView ( ) ;
542
550
You can’t perform that action at this time.
0 commit comments