From 51a9d2806d6ef3749d39fb2720ac6a429a8c3f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Wed, 15 Mar 2023 10:19:42 +0000 Subject: [PATCH] Restore some guards in ReactFabricGlobalResponderHandler after refactor --- .../src/ReactFabricGlobalResponderHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js b/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js index 10ac51d4317d6..2ec797e9bd447 100644 --- a/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js +++ b/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js @@ -9,7 +9,7 @@ const ReactFabricGlobalResponderHandler = { onChange: function (from: any, to: any, blockNativeResponder: boolean) { - if (from) { + if (from && from.stateNode) { // equivalent to clearJSResponder nativeFabricUIManager.setIsJSResponder( from.stateNode.node, @@ -18,7 +18,7 @@ const ReactFabricGlobalResponderHandler = { ); } - if (to) { + if (to && to.stateNode) { // equivalent to setJSResponder nativeFabricUIManager.setIsJSResponder( to.stateNode.node,