We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac37bf7 commit dc3acdfCopy full SHA for dc3acdf
1 file changed
packages/react-docgen/src/utils/getMemberExpressionValuePath.ts
@@ -42,7 +42,6 @@ function resolveName(path: NodePath): string | undefined {
42
path.isArrowFunctionExpression() ||
43
path.isTaggedTemplateExpression() ||
44
path.isCallExpression() ||
45
- path.isObjectMethod() ||
46
isReactForwardRefCall(path)
47
) {
48
let currentPath: NodePath = path;
@@ -64,6 +63,16 @@ function resolveName(path: NodePath): string | undefined {
64
63
return;
65
}
66
+ if (path.isObjectMethod()) {
67
+ const key = path.get('key');
68
+
69
+ if (key.isIdentifier()) {
70
+ return key.node.name;
71
+ }
72
73
+ return;
74
75
76
throw new TypeError(
77
'Attempted to resolveName for an unsupported path. resolveName does not accept ' +
78
path.node.type +
0 commit comments