Skip to content

Commit

Permalink
Move interactiveUpdates comment to point of assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nhunzaker committed Sep 11, 2018
1 parent 16ad8d6 commit 60de292
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions packages/react-dom/src/events/ReactDOMEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,13 @@ export function trapBubbledEvent(
if (!element) {
return null;
}

// Check if interactive and wrap in interactiveUpdates
const dispatch = isInteractiveTopLevelEventType(topLevelType)
? dispatchInteractiveEvent
: dispatchEvent;

addEventBubbleListener(
element,
getRawEventName(topLevelType),
// Check if interactive and wrap in interactiveUpdates
dispatch,
);
addEventBubbleListener(element, getRawEventName(topLevelType), dispatch);
}

/**
Expand All @@ -172,16 +169,13 @@ export function trapCapturedEvent(
if (!element) {
return null;
}

// Check if interactive and wrap in interactiveUpdates
const dispatch = isInteractiveTopLevelEventType(topLevelType)
? dispatchInteractiveEvent
: dispatchEvent;

addEventCaptureListener(
element,
getRawEventName(topLevelType),
// Check if interactive and wrap in interactiveUpdates
dispatch,
);
addEventCaptureListener(element, getRawEventName(topLevelType), dispatch);
}

function dispatchInteractiveEvent(nativeEvent) {
Expand Down

0 comments on commit 60de292

Please sign in to comment.