Skip to content

Commit

Permalink
Code review changes made for #11140
Browse files Browse the repository at this point in the history
  • Loading branch information
imanushree committed Oct 18, 2017
1 parent 600abba commit 59d751d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
10 changes: 1 addition & 9 deletions src/isomorphic/modern/class/ReactNoopUpdateQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@ function warnNoop(publicInstance, callerName) {
const currentComponent =
(constructor && (constructor.displayName || constructor.name)) ||
'ReactClass';
const currentComponentError =
callerName +
'(...): Can only update a mounted or mounting component. ' +
'This usually means you called ' +
callerName +
'() on an unmounted component. ' +
'This is a no-op.\n\nPlease check the code for the ' +
currentComponent +
' component.';
const currentComponentError = `${callerName}_${currentComponent}`;

warning(
!!errorInfo[currentComponentError],
Expand Down
10 changes: 1 addition & 9 deletions src/renderers/shared/server/ReactPartialRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,7 @@ function warnNoop(
var constructor = publicInstance.constructor;
const currentComponent =
(constructor && getComponentName(constructor)) || 'ReactClass';
const currentComponentError =
callerName +
'(...): Can only update a mounting component. ' +
'This usually means you called ' +
callerName +
'() outside componentWillMount() on the server. ' +
'This is a no-op.\n\nPlease check the code for the ' +
currentComponent +
' component.';
const currentComponentError = `${callerName}_${currentComponent}`;

warning(
!!errorInfo[currentComponentError],
Expand Down

0 comments on commit 59d751d

Please sign in to comment.