From 4934ea56a07343c97e60f38d362b3a71261a60f0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sat, 13 Jun 2015 18:50:19 +0100 Subject: [PATCH] change NodePath#inType to use arguments instead of types --- src/babel/traversal/path/ancestry.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;