File tree Expand file tree Collapse file tree
packages/react-native-renderer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,11 +43,9 @@ export function dispatchEvent(
4343 ) ;
4444 }
4545
46- let eventTarget ;
46+ let eventTarget = null ;
4747 if ( enableNativeTargetAsInstance ) {
48- if ( targetFiber == null ) {
49- eventTarget = null ;
50- } else {
48+ if ( targetFiber != null ) {
5149 eventTarget = targetFiber . stateNode . canonical ;
5250 }
5351 } else {
Original file line number Diff line number Diff line change @@ -100,11 +100,9 @@ function _receiveRootNodeIDEvent(
100100 const nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT ;
101101 const inst = getInstanceFromNode ( rootNodeID ) ;
102102
103- let target ;
103+ let target = null ;
104104 if ( enableNativeTargetAsInstance ) {
105- if ( inst == null ) {
106- target = null ;
107- } else {
105+ if ( inst != null ) {
108106 target = inst . stateNode ;
109107 }
110108 } else {
You can’t perform that action at this time.
0 commit comments