Put warnForInvalidEventListener call behind nextProp check (#10527)
Brandon Dail committed
Aug 23, 2017 at 23:34 UTC
1f55e2dcf8e55b7218f91a8522f3730553df68f3
1 file changed
+3
-3
src/renderers/dom/fiber/ReactDOMFiberComponent.js
+3
-3
@@ -951,10 +951,10 @@ var ReactDOMFiberComponent = {
951
}
952
}
953
} else if (registrationNameModules.hasOwnProperty(propKey)) {
954
- if (__DEV__ && typeof nextProp !== 'function') {
955
- warnForInvalidEventListener(propKey, nextProp);
956
- }
954
if (nextProp) {
955
+ if (__DEV__ && typeof nextProp !== 'function') {
956
+ warnForInvalidEventListener(propKey, nextProp);
957
+ }
958
ensureListeningTo(rootContainerElement, propKey);
959
}
960
} else if (__DEV__) {