Skip to content

Commit f3c1e93

Browse files
committed
add throw
1 parent 27b2aa0 commit f3c1e93

File tree

1 file changed

+4
-0
lines changed
  • packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core

1 file changed

+4
-0
lines changed

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,10 @@ open class GestureHandler {
594594
eventCoalescingKey = nextEventCoalescingKey++
595595
}
596596

597+
check(hostDetectorView != null || orchestrator != null) {
598+
"Manually handled gesture had not been assigned to any detector"
599+
}
600+
597601
if (orchestrator == null) {
598602
// If the state is set manually, the handler may not have been fully recorded by the orchestrator.
599603
hostDetectorView?.recordHandlerIfNotPresent(this)

0 commit comments

Comments
 (0)