We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6d4293 commit 27d7592Copy full SHA for 27d7592
src/test/ReactTestUtils.js
@@ -410,9 +410,11 @@ NoopInternalComponent.prototype = {
410
411
var ShallowComponentWrapper = function(element) {
412
// TODO: Consolidate with instantiateReactComponent
413
- this._debugID = nextDebugID++;
414
- var displayName = element.type.displayName || element.type.name || 'Unknown';
415
- ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName);
+ if (__DEV__) {
+ this._debugID = nextDebugID++;
+ var displayName = element.type.displayName || element.type.name || 'Unknown';
416
+ ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName);
417
+ }
418
419
this.construct(element);
420
};
0 commit comments