mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Error in extractEvents
If the event is on the window object, topScroll, for instance, the topLevelTarget will not have getAttribute defined. Restore the previous `|| !topLevelTarget.attributes` check to avoid an error on every scroll.
This commit is contained in:
committed by
Paul O’Shannessy
parent
696e556eae
commit
bf5dfc87dc
@@ -149,7 +149,7 @@ function extractEvents(
|
||||
topLevelTargetID,
|
||||
nativeEvent) {
|
||||
var currentEvent = topLevelTypesToAnalyticsEvent[topLevelType];
|
||||
if (!currentEvent || !topLevelTarget) {
|
||||
if (!currentEvent || !topLevelTarget || !topLevelTarget.attributes) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user