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:
Ian Obermiller
2014-05-21 15:12:26 -07:00
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;
}