diff --git a/src/infer/membership.js b/src/infer/membership.js index 1ac350a28..756d43e3b 100644 --- a/src/infer/membership.js +++ b/src/infer/membership.js @@ -91,7 +91,10 @@ function extractThis(path, comment) { scope = scope.parent; } - if (n.isClassMethod(scope.block)) { + if ( + n.isClassMethod(scope.block) && + scope.path.parentPath.parentPath.node.id !== null + ) { identifiers.push( scope.path.parentPath.parentPath.node.id.name, 'prototype'