Browse Source

rewrite computed property identifiers

contingency-plan
Rich Harris 10 years ago
parent
commit
da193c40cd
  1. 2
      src/Statement.js

2
src/Statement.js

@ -278,7 +278,7 @@ export default class Statement {
// We want to rewrite identifiers (that aren't property names)
if ( node.type !== 'Identifier' ) return;
if ( parent.type === 'MemberExpression' && node !== parent.object ) return;
if ( parent.type === 'MemberExpression' && !parent.computed && node !== parent.object ) return;
if ( parent.type === 'Property' && node !== parent.value ) return;
// TODO others...?

Loading…
Cancel
Save