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; }