From da193c40cdc13cbe7beb964379154e64c8cdf901 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 22 May 2015 11:39:19 -0400 Subject: [PATCH] rewrite computed property identifiers --- src/Statement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Statement.js b/src/Statement.js index a6552aa..94d43a2 100644 --- a/src/Statement.js +++ b/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...?