@samitouri / QOS-React-2 / commits / 3a49dff386

[react-events] Use context.objectAssign in Tap responder (#16748)

Dominic Gannaway committed Sep 11, 2019 at 17:06 UTC 3a49dff386ad99ccea320334ba631899bab25e62
1 file changed +4 -4
packages/react-events/src/dom/Tap.js
+4 -4
@@ -377,7 +377,7 @@ function dispatchStart(
377 const type = 'tap:start';
378 const onTapStart = props.onTapStart;
379 if (onTapStart != null) {
380 - const payload = {...state.gestureState, type};
380 + const payload = context.objectAssign({}, state.gestureState, {type});
381 dispatchDiscreteEvent(context, payload, onTapStart);
382 }
383 }
@@ -402,7 +402,7 @@ function dispatchUpdate(
402 const type = 'tap:update';
403 const onTapUpdate = props.onTapUpdate;
404 if (onTapUpdate != null) {
405 - const payload = {...state.gestureState, type};
405 + const payload = context.objectAssign({}, state.gestureState, {type});
406 dispatchUserBlockingEvent(context, payload, onTapUpdate);
407 }
408 }
@@ -415,7 +415,7 @@ function dispatchEnd(
415 const type = 'tap:end';
416 const onTapEnd = props.onTapEnd;
417 if (onTapEnd != null) {
418 - const payload = {...state.gestureState, type};
418 + const payload = context.objectAssign({}, state.gestureState, {type});
419 dispatchDiscreteEvent(context, payload, onTapEnd);
420 }
421 }
@@ -428,7 +428,7 @@ function dispatchCancel(
428 const type = 'tap:cancel';
429 const onTapCancel = props.onTapCancel;
430 if (onTapCancel != null) {
431 - const payload = {...state.gestureState, type};
431 + const payload = context.objectAssign({}, state.gestureState, {type});
432 dispatchDiscreteEvent(context, payload, onTapCancel);
433 }
434 }