Skip to content

Commit

Permalink
Put warnForInvalidEventListener call behind nextProp check (facebook#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aweary authored Aug 24, 2017
1 parent 2fa38ac commit 1f55e2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderers/dom/fiber/ReactDOMFiberComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,10 @@ var ReactDOMFiberComponent = {
}
}
} else if (registrationNameModules.hasOwnProperty(propKey)) {
if (__DEV__ && typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
if (nextProp) {
if (__DEV__ && typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
ensureListeningTo(rootContainerElement, propKey);
}
} else if (__DEV__) {
Expand Down

0 comments on commit 1f55e2d

Please sign in to comment.