From d7c37c17f21e9f03d02f618c88244799609d4fe7 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Wed, 9 Aug 2017 18:18:17 -0700 Subject: [PATCH] Wrap one more warning in a DEV block For RN. --- .../eventPlugins/ResponderTouchHistoryStore.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js b/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js index f7c47d3f1730..6a7360c42160 100644 --- a/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js +++ b/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js @@ -104,13 +104,15 @@ function resetTouchRecord(touchRecord: TouchRecord, touch: Touch): void { function getTouchIdentifier({identifier}: Touch): number { invariant(identifier != null, 'Touch object is missing identifier.'); - warning( - identifier <= MAX_TOUCH_BANK, - 'Touch identifier %s is greater than maximum supported %s which causes ' + - 'performance issues backfilling array locations for all of the indices.', - identifier, - MAX_TOUCH_BANK, - ); + if (__DEV__) { + warning( + identifier <= MAX_TOUCH_BANK, + 'Touch identifier %s is greater than maximum supported %s which causes ' + + 'performance issues backfilling array locations for all of the indices.', + identifier, + MAX_TOUCH_BANK, + ); + } return identifier; }