Avoid exception when instanceof is in anonymous function declaration.

This commit is contained in:
Logan Smyth 2017-09-26 13:18:54 -07:00
parent 9b0f509433
commit f11cce1d7c

View File

@ -9,6 +9,7 @@ export default function({ types: t }) {
return (
(path.isVariableDeclarator() && path.node.id === helper) ||
(path.isFunctionDeclaration() &&
path.node.id &&
path.node.id.name === helper.name)
);
});