From fb0325a4d8e57918d3969765b48e2c8aca9e84f8 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 4 Nov 2014 18:33:48 +1100 Subject: [PATCH] add support for SpreadElement to types.getIds --- lib/6to5/types/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/6to5/types/index.js b/lib/6to5/types/index.js index da3049351f..3c0cba5d62 100644 --- a/lib/6to5/types/index.js +++ b/lib/6to5/types/index.js @@ -117,6 +117,8 @@ t.getIds = function (node, map) { search = search.concat(id.declarations); } else if (t.isVariableDeclarator(id)) { search.push(id.id); + } else if (t.isSpreadElement(id)) { + search.push(id.argument); } else if (id) { throw new Error("unknown node " + id.type); }