diff --git a/src/ast/isReference.js b/src/ast/isReference.js index 4b8c71b..98d8df5 100644 --- a/src/ast/isReference.js +++ b/src/ast/isReference.js @@ -4,6 +4,9 @@ export default function isReference ( node, parent ) { } if ( node.type === 'Identifier' ) { + // the only time we could have an identifier node without a parent is + // if it's the entire body of a function without a block statement – + // i.e. an arrow function expression like `a => a` if ( !parent ) return true; // TODO is this right?