Skip to content

Commit

Permalink
added a __DEV__ block in checkReactTypeSpec
Browse files Browse the repository at this point in the history
this should remove ReactComponentTreeDevtool from the prod bundle
  • Loading branch information
Keyan Zhang committed Jul 4, 2016
1 parent 34ca3eb commit f7dc3e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/isomorphic/classic/types/checkReactTypeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,

var componentStackInfo = '';

if (debugID !== null) {
componentStackInfo = ReactComponentTreeDevtool.getStackAddendumByID(debugID);
} else if (element !== null) {
componentStackInfo = ReactComponentTreeDevtool.getCurrentStackAddendum(element);
if (__DEV__) {
if (debugID !== null) {
componentStackInfo = ReactComponentTreeDevtool.getStackAddendumByID(debugID);
} else if (element !== null) {
componentStackInfo = ReactComponentTreeDevtool.getCurrentStackAddendum(element);
}
}

warning(
Expand Down

0 comments on commit f7dc3e0

Please sign in to comment.