From 3313f769f5660857487bc9fc012bd51c80056bd3 Mon Sep 17 00:00:00 2001 From: Nick Lockwood Date: Thu, 3 Dec 2015 07:43:34 -0800 Subject: [PATCH] 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 --- Libraries/Components/Touchable/Touchable.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Libraries/Components/Touchable/Touchable.js b/Libraries/Components/Touchable/Touchable.js index 0493311c5..9172739eb 100644 --- a/Libraries/Components/Touchable/Touchable.js +++ b/Libraries/Components/Touchable/Touchable.js @@ -572,14 +572,9 @@ var TouchableMixin = { var curState = this.state.touchable.touchState; if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) { - if (__DEV__) { - throw new Error( - 'Attempted to transition from state `' + curState + '` to `' + - States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. ' + - 'This is most likely due to `Touchable.longPressDelayTimeout` not ' + - 'being cancelled.' - ); - } + console.error('Attempted to transition from state `' + curState + '` to `' + + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.'); } else { this._receiveSignal(Signals.LONG_PRESS_DETECTED, e); }