Browse Source

add comment re arrow function expression special case

gh-438-b
Rich-Harris 9 years ago
parent
commit
a7de73fbe9
  1. 3
      src/ast/isReference.js

3
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?

Loading…
Cancel
Save