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); }