From ff025e63ecccd67263bbd988b0500014d2bd2982 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 26 Nov 2014 00:40:42 +1100 Subject: [PATCH] add ParenthesizedExpression support to t.isDynamic --- lib/6to5/types/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/6to5/types/index.js b/lib/6to5/types/index.js index 3ed12a6e47..5db1a528d5 100644 --- a/lib/6to5/types/index.js +++ b/lib/6to5/types/index.js @@ -114,7 +114,9 @@ t.shallowEqual = function (actual, expected) { // t.isDynamic = function (node) { - if (t.isIdentifier(node) || t.isLiteral(node) || t.isThisExpression(node)) { + if (t.isParenthesizedExpression(node)) { + return t.isDynamic(node.expression); + } else if (t.isIdentifier(node) || t.isLiteral(node) || t.isThisExpression(node)) { return false; } else if (t.isMemberExpression(node)) { return t.isDynamic(node.object) || t.isDynamic(node.property);