dillon1000/react
Commit
Browse files Hardened validateCallback to better handle null values (#8973)
Previously, calls to validateCallback() with a null callback value resulted in runtime errors if a certain transform was not applied prior to running. This commit wraps the invariant() with the condition check so as to avoid calling formatUnexpectedArgument() unless necessary. It also replaces the truthy/falsy callback check with an explicit check for improved performance.
Changed paths1 file
First-parent comparisonsrc/renderers/shared/utils/validateCallback.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…