diff --git a/src/babel/traversal/path/ancestry.js b/src/babel/traversal/path/ancestry.js index 5077a5ca66..22d335200e 100644 --- a/src/babel/traversal/path/ancestry.js +++ b/src/babel/traversal/path/ancestry.js @@ -44,12 +44,10 @@ export function getAncestry() { * Description */ -export function inType(types) { - if (!Array.isArray(types)) types = [types]; - +export function inType() { var path = this; while (path) { - for (var type of (types: Array)) { + for (var type of (arguments: Array)) { if (path.node.type === type) return true; } path = path.parentPath;