Skip to content

Commit 23dbb88

Browse files
committed
Use the function name as a description of a resolved function value
1 parent b9b8371 commit 23dbb88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/shared/ReactIODescription.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export function getIODescription(value: mixed): string {
1313
}
1414
try {
1515
switch (typeof value) {
16+
case 'function':
17+
return value.name || '';
1618
case 'object':
1719
// Test the object for a bunch of common property names that are useful identifiers.
1820
// While we only have the return value here, it should ideally be a name that

0 commit comments

Comments
 (0)