File tree 1 file changed +8
-6
lines changed
Libraries/Renderer/src/renderers/shared/shared/event
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -138,20 +138,22 @@ var EventPluginHub = {
138
138
return null ;
139
139
}
140
140
} else {
141
- if ( typeof inst . _currentElement === 'string' ) {
141
+ const currentElement = inst . _currentElement ;
142
+ if (
143
+ typeof currentElement === 'string' || typeof currentElement === 'number'
144
+ ) {
142
145
// Text node, let it bubble through.
143
146
return null ;
144
147
}
145
148
if ( ! inst . _rootNodeID ) {
146
149
// If the instance is already unmounted, we have no listeners.
147
150
return null ;
148
151
}
149
- const props = inst . _currentElement . props ;
150
- if ( ! props ) {
151
- return null ;
152
- }
152
+ const props = currentElement . props ;
153
153
listener = props [ registrationName ] ;
154
- if ( shouldPreventMouseEvent ( registrationName , inst . _currentElement . type , props ) ) {
154
+ if (
155
+ shouldPreventMouseEvent ( registrationName , currentElement . type , props )
156
+ ) {
155
157
return null ;
156
158
}
157
159
}
You can’t perform that action at this time.
0 commit comments