Skip to content

Commit

Permalink
[react-events] Use context.objectAssign in Tap responder (#16748)
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm committed Sep 11, 2019
1 parent 56114a4 commit 3a49dff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-events/src/dom/Tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function dispatchStart(
const type = 'tap:start';
const onTapStart = props.onTapStart;
if (onTapStart != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapStart);
}
}
Expand All @@ -402,7 +402,7 @@ function dispatchUpdate(
const type = 'tap:update';
const onTapUpdate = props.onTapUpdate;
if (onTapUpdate != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchUserBlockingEvent(context, payload, onTapUpdate);
}
}
Expand All @@ -415,7 +415,7 @@ function dispatchEnd(
const type = 'tap:end';
const onTapEnd = props.onTapEnd;
if (onTapEnd != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapEnd);
}
}
Expand All @@ -428,7 +428,7 @@ function dispatchCancel(
const type = 'tap:cancel';
const onTapCancel = props.onTapCancel;
if (onTapCancel != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapCancel);
}
}
Expand Down

0 comments on commit 3a49dff

Please sign in to comment.