Skip to content

Commit

Permalink
Remove unnecesary call for better inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 21, 2020
1 parent 3e039e8 commit f976c48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-dom/src/events/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ export const MouseEventInterface: EventInterfaceType = {
if ('movementY' in event) {
return event.movementY;
}
updateMouseMovementPolyfillState(event);
// Don't need to call updateMouseMovementPolyfillState() here
// because it's guaranteed to have already run when movementX
// was copied.
return lastMovementY;
},
};
Expand Down

0 comments on commit f976c48

Please sign in to comment.