From c967cded78f215bb9b01b28f4427f47b29fbbdc1 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 4 Nov 2014 12:56:53 +1100 Subject: [PATCH] make id optional in t.getIds --- lib/6to5/types/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/types/index.js b/lib/6to5/types/index.js index 31533075e7..9ba1beafa6 100644 --- a/lib/6to5/types/index.js +++ b/lib/6to5/types/index.js @@ -117,7 +117,7 @@ t.getIds = function (node) { search = search.concat(id.declarations); } else if (t.isVariableDeclarator(id)) { search.push(id.id); - } else { + } else if (id) { throw new Error("unknown node " + id.type); } }