Use console.error() for the Touchable.js bug so we can capture it in production logs
Reviewed By: javache Differential Revision: D2717874 fb-gh-sync-id: 7c2cac61fe4fbd2c6de6cf1d9059df9ac119f543
This commit is contained in:
parent
87253ca722
commit
3313f769f5
|
@ -572,14 +572,9 @@ var TouchableMixin = {
|
||||||
var curState = this.state.touchable.touchState;
|
var curState = this.state.touchable.touchState;
|
||||||
if (curState !== States.RESPONDER_ACTIVE_PRESS_IN &&
|
if (curState !== States.RESPONDER_ACTIVE_PRESS_IN &&
|
||||||
curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {
|
curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {
|
||||||
if (__DEV__) {
|
console.error('Attempted to transition from state `' + curState + '` to `' +
|
||||||
throw new Error(
|
States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' +
|
||||||
'Attempted to transition from state `' + curState + '` to `' +
|
'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.');
|
||||||
States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. ' +
|
|
||||||
'This is most likely due to `Touchable.longPressDelayTimeout` not ' +
|
|
||||||
'being cancelled.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);
|
this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue