File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
packages/react-native-renderer/src Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,9 @@ export function dispatchEvent(
43
43
) ;
44
44
}
45
45
46
- let eventTarget ;
46
+ let eventTarget = null ;
47
47
if ( enableNativeTargetAsInstance ) {
48
- if ( targetFiber == null ) {
49
- eventTarget = null ;
50
- } else {
48
+ if ( targetFiber != null ) {
51
49
eventTarget = targetFiber . stateNode . canonical ;
52
50
}
53
51
} else {
Original file line number Diff line number Diff line change @@ -100,11 +100,9 @@ function _receiveRootNodeIDEvent(
100
100
const nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT ;
101
101
const inst = getInstanceFromNode ( rootNodeID ) ;
102
102
103
- let target ;
103
+ let target = null ;
104
104
if ( enableNativeTargetAsInstance ) {
105
- if ( inst == null ) {
106
- target = null ;
107
- } else {
105
+ if ( inst != null ) {
108
106
target = inst . stateNode ;
109
107
}
110
108
} else {
You can’t perform that action at this time.
0 commit comments