dillon1000/react

Commit

[react-devtools-shared] Added string type check for object name prop in getDisplayName function (#16798)

* [react-devtools-shared] Added string type check for object name prop in getDisplayName function from utils.js file; tests included;

* Re-added empty string check to getDisplayName()

* Tweaked tests to use real functions

This more closely simulates how the utility is being used in production, and would catch cases like anonymous functions (with empty string names).
Browse files
Changed paths2 files
First-parent comparison
A packages/react-devtools-shared/src/__tests__/utils-test.js AddedM packages/react-devtools-shared/src/utils.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…