Skip to content

Commit

Permalink
Allow for null targetFiber for root event handling (#15247)
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm authored Mar 29, 2019
1 parent c6f3524 commit 5d336df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/DOMEventResponderSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function handleTopLevelType(

export function runResponderEventsInBatch(
topLevelType: DOMTopLevelEventType,
targetFiber: Fiber,
targetFiber: null | Fiber,
nativeEvent: AnyNativeEvent,
nativeEventTarget: EventTarget,
eventSystemFlags: EventSystemFlags,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/ReactDOMEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function handleTopLevel(bookKeeping: BookKeepingInstance) {
nativeEvent,
eventTarget,
);
} else if (enableEventAPI && targetInst !== null) {
} else if (enableEventAPI) {
// Responder event system (experimental event API)
runResponderEventsInBatch(
topLevelType,
Expand Down

0 comments on commit 5d336df

Please sign in to comment.